Question
September 13, 2007 at 04:22 PM
curtis_roseman

datetime literal update

by curtis_roseman . Updated 19 years, 1 month ago

I would like to know, if there is a way to update only the year portion of the datetime literal? Each row is to represent the months of the calendar year.
ex: SET StartDate = ‘2007-1-1’, EndDate = ‘2007-1-31’
WHERE Period = 1
StartDate(datetime,NULL)
EndDate(datetime,NULL)

I am wanting to change the year without having to create SET statements for each month, possibly using the GETDATE() to supply the current year.
Thanks

This discussion is locked

All Comments