Home Forums Article Discussions Article Discussions by Author Discuss content posted by Bernabe Diaz t-sql first last day date of the month RE: t-sql first last day date of the month
gofrancesc
Hall of Fame
Points: 3269
More actions
December 2, 2009 at 3:31 am
#1086339
Hello,
if you want to take off hours, minutes and seconds, getting only the "date" part of the calculated date, add this line of code:
SET @r = cast(floor(cast(@R as FLOAT)) as DATETIME)
Best wishes,
Francesc