none
Extracting only year from getdate() function...

    Question

  • Hi Guys,

     

    I was wondering if there is a way to extract only the year in the output from the getdate() function. Would like to know your thoughts on the same.

     

    Thanks,

     

    Satvik

     

    Tuesday, August 19, 2008 4:11 PM

Answers

  • Use the YEAR() function.

     

    something like:

     

    SELECT year( getdate() )

     

     

    Tuesday, August 19, 2008 4:13 PM
    Moderator

All replies