Forum Discussion

kmilarov's avatar
kmilarov
Icon for Helper II rankHelper II
3 years ago
Solved

Special Date format conversation

Hi Guys, I have a dataset where the date format is a whole number, but - it starts from 01Jan1972 as a day 1, 02Jan1972 is shown as day 2 etc. today, 05Sep2029 ias shows as date 18876 

In practice it counts the pasing days since 01Jan1972 (including 01Jan1972). . How can I convert these dates to ta real date format in Power Query ? (or in DAX if Power Query is not possible ) 

  • kmilarov add a new column in PQ using following M code:

     

    Date.AddDays(#date(1972,1,1), [YourNumberColumn]-1)

2 Replies

  • kmilarov add a new column in PQ using following M code:

     

    Date.AddDays(#date(1972,1,1), [YourNumberColumn]-1)
    • kmilarov's avatar
      kmilarov
      Icon for Helper II rankHelper II

      parry2k Tahnk you! It works. What about the similar for time - time is in millisecnds and I need it in HH:MM format starting fomr the midnight ?