Combine two columns!

  • Hi all,

    I want to combine two column date and time sent to one column while importing from excel file to sql 2000.

    how can i do that in transformation.

    Thanks

  • Declare @Date datetime

    declare @Time datetime

    set @Date = DATEADD(D, 0, DATEDIFF(D, 0, GetDate()))

    set @Time = DATEADD(D, - DateDiff(D, 0, GetDate()), GetDate())

    Select @Date, @Time, @Date + @Time, DATEADD(MS, DATEDIFF(MS, 0, @Time), @Date)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply