0

Impala to_timestamp() returns extra 1 hour

SELECT to_timestamp(01051984, ddMMyyyy) 

returns '1984-05-01 00:00:00'.

SELECT to_timestamp(01041984, ddMMyyyy)

returns '1984-04-01 01:00:00' in DBeaver and Aqua Data Studio and '1984-04-01 00:00:00' in Hue. Why?

GMB
  • 216,147
  • 25
  • 84
  • 135
Gecko
  • 1
  • 4
  • 1
    THis may be a local system related issue. what is the timezone of the machine you are using DBeaver from? can you use TO_UTC_TIMESTAMP() and see if this inconsistency exists ? – Koushik Roy Mar 13 '23 at 10:25
  • TO_UTC_TIMESTAMP('01041984', 'ddMMyyyy') returns NULL – Gecko Mar 13 '23 at 11:39
  • sorry, i mean to say `UNIX_TIMESTAMP('01041984', 'ddMMyyyy'),` ? to UTC will convert a timestamp to UTC. – Koushik Roy Mar 13 '23 at 15:02

0 Answers0