我有 Ingres DB 和一个带有时间戳列的表(自 1970 年 1 月 1 日以来的秒数)。我需要找到今天发生的所有条目。可能的解决方案是:
SELECT * FROM table WHERE date(_date(timestamp)) = date('today')
但是,将每个时间戳转换ingresdate
为不是最有效的,我只想比较整数(即timestamp > x() AND timestamp < x() + 86400
)
有没有办法转换date('today')
成时间戳?我在入口文档中找不到任何关于它的信息。