sql - redshift to_timestamp() without millisecond -
how convert string 2017-06-20t09:52:33+0000
timestamp 2017-06-20 09:52:33
. tried still got last +00
:
select to_timestamp(substring('2017-06-20t09:52:33+0000',1,19), 'yyyy-mm-dd hh24:mi:ss') >> 2017-06-20 09:52:33+00
try:
select left(to_timestamp(substring('2017-06-20t09:52:33+0000',1,19), 'yyyy-mm-dd hh24:mi:ss'),19); >> 2017-06-20 09:52:33
this'll work sure. let me know if still face issues.
Comments
Post a Comment