I have a table tbltimetable, with three columns, Appdate, begintime, endtime (all datetime datatype).
Sample data:
Appdate begintime endtime
2013-09-11 00:00:00.000 1900-01-01 12:30:00.000 1900-01-01 14:45:00.000
I need a final result like the following: replace the date in begintime and endtime from appdate.
Appdate begintime endtime
2013-09-11 00:00:00.000 2013-09-11 12:30:00.000 2013-09-11 14:45:00.000
I tried to split the date and time from respective columns, but now I 'm struck in appending /replacing the values from appdate in begintime and endtime.
select convert(date,tbltimetable.AppDate) as [date],
convert(varchar(8), convert(time, tblAppTime.AppDate)) as [Time]