Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
amsqlguy
Yak Posting Veteran
89 Posts |
Posted - 2008-09-22 : 13:13:47
|
| Guys,Is there any SQL function which gets only the date instead of timestampfor example select getdate()Standard output2008-09-22 13:12:37.880Desired output2008-09-22 00:00:00.000Any suggestions/inputs would helpThanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-22 : 13:15:33
|
| select dateadd(dd,datediff(dd,0,getdate()),0) |
 |
|
|
amsqlguy
Yak Posting Veteran
89 Posts |
Posted - 2008-09-22 : 13:25:55
|
quote: Originally posted by visakh16 select dateadd(dd,datediff(dd,0,getdate()),0)
Thanks man - that works just perfect. |
 |
|
|
|
|
|