Forum Discussion

anelliaf's avatar
anelliaf
Helper II
6 years ago
Solved

Json Timestamp to Date

Hi,

 

I parsed a JSON file into a few columns in Power BI.  I have a column called 'CreationTime' that seems to be a timestamp field, i.e.:

 

2019-09-27T15:53:14

 

I'd like to break this down into Day, Month, Year.  I've tried to use the DATEVALUE format, but nothing.

 

Any ideas how I can change filter this field into day, month, year?

 

Thanks,

Frank

  • Hi anelliaf 

    Please change it to "datetime" type.

     

    select "column1", then add column-> date only,

    select "date", then add column-> year/month,,,ect

    Best Regards
    Maggie
    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • anelliaf you can change it to date/time by clicking the column header and then add another step to change it to date. You can also add custom column and datetimezone function to get date from it.

    • anelliaf's avatar
      anelliaf
      Helper II

      When I go to Model, click on the column 'CreationTime', and in the Properties page I choose Date under DataType I receive the following message:

       

      We can't automatically convert the column to Date type.

      • v-juanli-msft's avatar
        v-juanli-msft
        Community Support

        Hi anelliaf 

        Please change it to "datetime" type.

         

        select "column1", then add column-> date only,

        select "date", then add column-> year/month,,,ect

        Best Regards
        Maggie
        Community Support Team _ Maggie Li
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.