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.


  • AS
    AS Coach

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


    str_to_date(DATE_ADD('01-JAN-1900', INTERVAL 43497.2411 day),'%Y-%d-%m')


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


    MajorDomo @ Merit Medical

    **Say "Thanks" by clicking the heart in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"