sqlserver跟据当天年月日日期查询数据库当天数据

select * from Client where  CONVERT(varchar(100), Cli_Datetime, 23) ='2017-11-06'

在查询之前要对表中datetime类型的时间字段要进行转换才能查;datetime默认的类型是1900-01-01 00:00:00.000   在这里需要转换一下

记录每一刻编程

原文地址:https://www.cnblogs.com/pang572936554/p/7793571.html