Skip to content
Advertisement

convert a string (43677) to date format in SQL(Redshift) [closed]

How to convert a string (43677) to date in SQL(Redshift)? (I’m trying to convert strings, which are number format of any particular date in excel)

Advertisement

Answer

It depends what day you want, but I think:

select dateadd(day, 43677, '1899-12-30')

This interprets the value as an Excel date. It produce 2019-07-31.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement