YanoRyuichi.com/
Wiki
Blog
GitHub
Sandbox
開始行:
* キャスト・切り捨て [#w17d663e]
SELECT date_trunc('hour', TIMESTAMP '2001-02-16 20:38:40...
Result: 2001-02-16 20:00:00
SELECT date_trunc('year', TIMESTAMP '2001-02-16 20:38:40...
Result: 2001-01-01 00:00:00
*** 秒の小数点以下の切り捨て [#a97eb622]
SELECT tm1 FROM tb1
2016-09-20 09:23:29.73666
SELECT date_trunc('second', tm1) FROM tb1;
2016-09-20 09:23:29
** 参考 [#kc3850f7]
- http://www.postgresql.jp/document/9.3/html/functions-da...
終了行:
* キャスト・切り捨て [#w17d663e]
SELECT date_trunc('hour', TIMESTAMP '2001-02-16 20:38:40...
Result: 2001-02-16 20:00:00
SELECT date_trunc('year', TIMESTAMP '2001-02-16 20:38:40...
Result: 2001-01-01 00:00:00
*** 秒の小数点以下の切り捨て [#a97eb622]
SELECT tm1 FROM tb1
2016-09-20 09:23:29.73666
SELECT date_trunc('second', tm1) FROM tb1;
2016-09-20 09:23:29
** 参考 [#kc3850f7]
- http://www.postgresql.jp/document/9.3/html/functions-da...
ページ名: