質問するログイン新規登録

回答編集履歴

3

追記

2018/04/17 13:22

投稿

sazi
sazi

スコア25430

answer CHANGED
@@ -2,4 +2,5 @@
2
2
 
3
3
  ```SQL
4
4
  select to_timestamp('20180417T051318400', 'yyyymmdd hh24missms')
5
- ```
5
+ ```
6
+ ※日付/時刻型の書式にないものは単なる文字として扱われます。

2

修正

2018/04/17 13:22

投稿

sazi
sazi

スコア25430

answer CHANGED
@@ -1,5 +1,5 @@
1
1
  書式はこちら([表 9-21. 日付/時刻型の書式テンプレートパターン](https://www.postgresql.jp/document/9.2/html/functions-formatting.html#FUNCTIONS-FORMATTING-DATETIME-TABLE))を参照して下さい。
2
2
 
3
3
  ```SQL
4
- select to_timestamp('20180417T051318400', 'yyyymmddThh24missms')
4
+ select to_timestamp('20180417T051318400', 'yyyymmdd hh24missms')
5
5
  ```

1

修正

2018/04/17 13:19

投稿

sazi
sazi

スコア25430

answer CHANGED
@@ -1,4 +1,4 @@
1
- 書式はこちら([表9.24 日付/時刻型の書式テンプレートパターン](https://www.postgresql.jp/document/10/html/functions-formatting.html#FUNCTIONS-FORMATTING-DATETIME-TABLE))を参照して下さい。
1
+ 書式はこちら([表 9-21. 日付/時刻型の書式テンプレートパターン](https://www.postgresql.jp/document/9.2/html/functions-formatting.html#FUNCTIONS-FORMATTING-DATETIME-TABLE))を参照して下さい。
2
2
 
3
3
  ```SQL
4
4
  select to_timestamp('20180417T051318400', 'yyyymmddThh24missms')