Home Forums SQL Server 2008 T-SQL (SS2K8) Convert concatenated varchar date and time to datetime RE: Convert concatenated varchar date and time to datetime
Recurs1on
SSCommitted
Points: 1974
More actions
February 7, 2012 at 9:50 am
#1443926
This should work
SELECT CONVERT( DATETIME, [date] + ' ' + [time] )
FROM concat_test
assuming neither of the fields are nullable