microsoft sql server get date as datetime code example Example: ms sql select datetime as date select cast(started_datetime as date) from table;