Home Forums SQL Server 2008 T-SQL (SS2K8) How to concatenate/convert date and time into a datetime? RE: How to concatenate/convert date and time into a datetime?

  • Converting dates/times to character and back is horribly inefficient, but if your table is small enough, it may still be fast enough to not significantly affect performance. Another option is the following.

    SELECT DATEADD(DAY, DATEDIFF(DAY, 0, StartDate), CAST(StartTime AS DATETIME))

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA