Showing posts with label SQL convert getdate() to date as of midnight. Show all posts
Showing posts with label SQL convert getdate() to date as of midnight. Show all posts

Wednesday, July 8, 2009

Convert getdate() to date as of midnight AM

I always have to remind myself how to do this . . . Is that sad?

Declare @today datetime

Set @Today = getdate()

Declare @Today3 smalldatetime

Set @Today3 = convert(datetime,convert(char(10),getdate(),101))

Select @Today, @Today3