Decimal to DateTime

My data for date is being imported as decimals in a text format. How do I convert this 43497.241179 to date time? Using magic ETL or beastmode.

Comments

  • AS
    AS 🔵

    Something like this should get you started, where you replace the number with your value column.

     

    addtime(
    str_to_date(DATE_ADD('01-JAN-1900', INTERVAL 43497.2411 day),'%Y-%d-%m')
    ,mod(43497.2411,1)*24*60*60
    )

     

    For time you may need to adjust for some Leap Day issues as discussed in the comments here.