Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetDate()
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
GetDate()
Miscellaneous
Thread ID:
00847612
Message ID:
00847612
Views:
62
Is there a better way to get the current date without a time than this?

dateadd(ms, datepart(ms, getdate())*-1, dateadd(ss, datepart(ss, getdate())*-1, dateadd(mi, datepart(mi, getdate())*-1, dateadd(hh,datepart(hh, getdate())*-1, getdate())))) - 1
Thanx,
Bill Elvin
Next
Reply
Map
View

Click here to load this message in the networking platform