Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date time column data 1

Status
Not open for further replies.

myvision69

Programmer
Feb 3, 2006
18
US


i have a date time column from which i only need to get the time portion hh:mm only and combine it with today's date into a datetime column.

e.g. 01/01/2000 12:12:00 needs to be converted to getdate() + time from column = 04/12/2006 12:12:00


Thanks for prompt reply
 
select myDatetimeColumn + datediff(dd, myDatetimeColumn , getdate())

------
[small]select stuff(stuff(replicate('<P> <B> ', 14), 109, 0, '<.'), 112, 0, '/')[/small]
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top