getdate tsql question -
how write tsql calculates following:
- the current date , mid night such 2010-12-01 00:00:00.000
 - the current date , 6pm such 2010-12-01 18:00:00.000
 
thanks..
you can try following
select dateadd(dd, datediff(dd, 0, getdate()), 0) datenotime,      dateadd(hh, 18, dateadd(dd, datediff(dd, 0, getdate()), 0)) datenewtime      
Comments
Post a Comment