select top 20000 printtime,case when convert(time,printtime)<'08:15:00' then convert(varchar(10),dateadd(day,-1,printtime),120) else convert(varchar(10),printtime,120) end from barcode order by id desc
SQL判断时间是否小于8点15分,如果是,日期算昨天
最新推荐文章于 2024-04-11 18:15:00 发布