2

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
  • 732,580
  • 175
  • 1,330
  • 1,459
michael_demonio
  • 188
  • 1
  • 2
  • 10

1 Answers1

6

How about this

        select cast(cast(getdate() as date) as datetime)
Chuck
  • 1,001
  • 1
  • 13
  • 19