首页 > 解决方案 > 如何用结束日的时间获取日期减去日期

问题描述

我的 date_end 时间为 01.01.2020 11:53、01.01.2020 14:28、03.01.2020 09:51、03.01.2020 06:02、04.01.2020 19:45。我愿意

date_end < to_date('03.01.2020 23:59', 'dd.mm.yyyy HH24:mi')

我只得到 01.01.2020 11:53、01.01.2020 14:28。我怎么能在没有 04.01.2020 的情况下所有 date_end

标签: sqlpostgresqldate

解决方案


the query looks ok. the only thing you need to check is the datatype of date_end column. It is probably not in the datetime format, and It only holds date without time fraction


推荐阅读