convert yyyy-mm-dd hh:mm:ss to yyyy-mm-dd in sql

converters, date, datetime, sql, t-sql

Solution

I suspect you are overthinking it. A simple cast as date will do the trick

Select Cast(SomeDateTime as date)

Problem

I need to convert yyyy-mm-dd hh:mm:ss.msec to yyyy-mm-dd in sql. I tried ``` CONVERT(DATETIME,MIN(Vdaily_calender.VDC_day_date),120) ``` but getting same result. Please advise Thanks Ar

Original source