I have a table where the dates are in Julian dates, and I would like to convert these dates into Calendar dates.
Here is a sample of a Julian date I have: 2457395.
In calendar date it should be: 07012016 (DDMMYYYY).
I tried to convert the date into the number of days since (01/01/1900) but even if I don't know how to have a date with a number of days as an input.
Many thanks in advance!
Well if it is a JDE Julian date for example 118163 for 12-06-2018 then below code can be used date_add(to_timestamp(concat(substr(cast(cast(118162 + 1900000 as int) as string),1,4),'01','01'),'yyyyMMdd'), cast(substr(cast(cast(118162 + 1900000 as int) as string),5,3) as int)-1)