sql - Convert time into datetime which returns today's date and time from database -
how can convert time datetime
returns today's date , time database?
let's have time in database. 12:30 pm
, when use:
convert(datetime, a.start time)
it returns 1900-01-01 12:30:00.000
. there way can today's date?
like :
2013-07-11 12:30:00:000
select convert(varchar(19), (cast(getdate() date) + cast(tm datetime)), 120) yourtable
output: 2013-07-11 12:30:00
check see if matches requirement
Comments
Post a Comment