updating timestamp column with timestamp containing 'T'

后端 未结 2 1377
死守一世寂寞
死守一世寂寞 2021-01-26 12:19

I have timestamp column:

MAX_LOAD_DATE_TS  TIMESTAMP(6)

My load_dates comes formatted with T in between date and

2条回答
  •  盖世英雄少女心
    2021-01-26 12:30

    You can use the appropriate format string as well as the CAST function, as below:

    SELECT 
            CAST(TO_DATE('2014-07-02T10:46:22', 'YYYY-MM-DD"T"HH24:MI:SS') AS TIMESTAMP(6)) AS timestamp_value
    FROM table;
    

    Related question

提交回复
热议问题