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

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -