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?
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?
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()))
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