Obsidian/Recognition/Programing/Tibero/Timestamp 시간 차이.md

10 lines
363 B
Markdown

```sql
SELECT systimestamp - tm AS interval
, EXTRACT(DAY FROM systimestamp - tm) *24*60*60
+ EXTRACT(HOUR FROM systimestamp - tm) *60*60
+ EXTRACT(MINUTE FROM systimestamp - tm) *60
+ EXTRACT(SECOND FROM systimestamp - tm) AS second
FROM (SELECT TO_TIMESTAMP('14/01/13 17:40:33.751000000', 'yy/mm/dd hh24:mi:ss.ff') tm FROM dual)
```