SqlServer查询语句中格式化当前时间

直接看案例:

select * from xxxx where crt_time >= convert(char(10),GetDate(),120) order by crt_time asc

其中 xxxx 为表名,crt_time 为时间类型的字段,时间为2019-11-22(即当前时间的前10位)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章