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

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -