how to remove time from datetime

前端 未结 10 1636
清酒与你
清酒与你 2020-12-01 10:18

The field DATE in the database has the following format:

2012-11-12 00:00:00

I would like to remove the time from the date and return the d

10条回答
  •  旧巷少年郎
    2020-12-01 11:04

    You may try the following:

    SELECT CONVERT(VARCHAR(10),yourdate,101);
    

    or this:

    select cast(floor(cast(urdate as float)) as datetime);
    

提交回复
热议问题