1

I need to obtain today's date but instead of current time I need the first time of the date.

WRONG WAY:

'4/7/2017 4:50:13 PM' 

as result of getdate() function

RIGHT WAY:

'4/7/2017 00:00:00 AM'

Thanks for your help

marc_s
  • 704,970
  • 168
  • 1,303
  • 1,425
michael_demonio
  • 178
  • 1
  • 2
  • 10

1 Answers1

5

How about this

        select cast(cast(getdate() as date) as datetime)
Chuck
  • 941
  • 1
  • 12
  • 19