0

I have a column in my table with the numerical equivalent to date in excel:

 TABLEA
 Col1
43276
43252
43253
43254

How do I convert this to a date in Presto? I want my final result to look like this:

      Col1
2018-06-25
2018-06-01
2018-06-02
2018-06-03

I attempted doing this but it gave results to 1970:

select *, date(from_unixtime(cast(Col1 as bigint))) as Col1 from TABLEA;
nak5120
  • 4,089
  • 4
  • 35
  • 94
  • 2
    See https://stackoverflow.com/questions/13850605/convert-excel-date-serial-number-to-regular-date to understand what your numbers are supposed to be. – Piotr Findeisen Aug 31 '18 at 05:11
  • Possible duplicate of [convert Excel Date Serial Number to Regular Date](https://stackoverflow.com/questions/13850605/convert-excel-date-serial-number-to-regular-date) – IRTFM Oct 09 '18 at 18:47

0 Answers0