0

When using getdate() I'm getting, for example, 2014-04-23 15:51:31.763.

I want to have 2014-04-23 00:00:00.000

How can I achieve that?

eugene.it
  • 427
  • 2
  • 13
  • 31

2 Answers2

0

A Similar Question has been posted and answered:

How to return the date part only from a SQL Server datetime datatype

However, to achieve your exact desire:

select convert(datetime, CONVERT(date,getdate()))

Community
  • 1
  • 1
isasto
  • 41
  • 2
-2

change it to simpledate format as yyyy-mm-dd and then convert it back to yyyy-mm-dd-xx:xx:xx:xxx then the timestamp will be removed and resetted to zero

Jose
  • 11
  • 1