What is the best way to strip the date from a DATETIME, so that only Time left to a comparison?
I know that I can do the following:
Convert (DATETIME, CONVERT (VARCHAR (8), GETDATE (), 8)) But it includes convert and characters if I want to see if the time (including minute) is stored in DATETIME columns two other times, then there is no way to rely on whether you Trust changing letters of the alphabet?
Try only the function from the timeline:
Function TimeOnly ( @Dateim Datetime), the return datead is started on the datetime or just enter the date time in SQL Server 2008:
declared Set @ time as time @time = cast (date time as time)
Comments
Post a Comment