I need some help with a query.
I have the following columns:
Fulltime (datetime)
Hour (varchar)
I need to convert the Hour into time format, and add it into the Fulltime
For example:
Fulltime = 2009-10-10 00:00:00:000
Hour = 10:30
Result = 2009-10-10 10:30:00:000
I found many ways to convert varchar to a datetime, but it always add a date into the result.
SELECT CONVERT(DATETIME, '2009-10-10 00:00:00:000', 120) + CAST('10:30' AS TIME)DATETIMEinstead ofTIME-SELECT CONVERT(DATETIME, '2009-10-10 00:00:00:000', 120) + CAST('10:30' AS DATETIME)