SQL Servers' GETDATE() function will return the current DateTime. But what if you just want the current date.
CAST(FLOOR(CAST(GETDATE() AS float)) AS datetime)
or
CAST(CONVERT(VARCHAR(10), GETDATE(), 111) AS DATETIME)
See this page for even more options.
Or, if you want to get just the current time out of GETDATE or any datetime for that matter, check out this page (it is one of the FAQs).
Remember Me
Powered by: newtelligence dasBlog 1.9.6264.0
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
E-mail
Theme design by Jelle Druyts