标签: timestamp-arithmetic

如何将时间戳截断为分钟?

我必须从当前时间戳和楼层(截断)减去5分钟到最近的分钟.比如'2016-02-23 06:10:3​​9.0'应该是'2016-02-23 06:05:00.0'.我已经找到了减去5分钟的方法

 systimestamp - interval '5' minute
Run Code Online (Sandbox Code Playgroud)

编辑1:我需要特定格式的时间戳,

 TO_TIMESTAMP((systimestamp - interval '15' minute),'YYYY-MM-DD HH24:MI:SS.ff')
Run Code Online (Sandbox Code Playgroud)

但这是给予的

ORA-01830: date format picture ends before converting entire input string
Run Code Online (Sandbox Code Playgroud)

但是我无法把它放到最近的一分钟.请帮忙.谢谢

sql oracle timestamp timestamp-arithmetic

3
推荐指数
1
解决办法
7980
查看次数

标签 统计

oracle ×1

sql ×1

timestamp ×1

timestamp-arithmetic ×1