Home Forums SQL Server 2005 T-SQL (SS2K5) datetime => how to have complete date with 00:00:00.000 RE: datetime => how to have complete date with 00:00:00.000
Mike_D
Hall of Fame
Points: 3295
More actions
December 2, 2009 at 1:57 am
#1086305
A number of ways of doing this:
SELECTCONVERT(datetime,CONVERT(char(8),MyDateTimeColumn,112))
FROM MyTable
or
SELECTCONVERT(datetime,DATEDIFF(DD,0,MyDateTimeColumn))
Hope that helps.
Mike