Home Forums Article Discussions Article Discussions by Author Discuss content posted by Jano Petras Get DATE part of the DATETIME RE: Get DATE part of the DATETIME
Lynn Pettis
SSC Guru
Points: 442467
More actions
February 4, 2008 at 10:56 pm
#774985
Another way to do this that I learned on SSC, and just as easy is this:
declare @DateOnly datetime
set @DateOnly = dateadd(dd,datediff(dd, 0, getdate()), 0)
😎