Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to fix date

Hi all,

I have date  04/21. How can I fix it to 01/04/2021?

 

  • Hi Anonymous ,

    Try like below:

    Step1,change date type to date:

     

    Step 2, use the following dax to create new date column:

    datenew = DATE(YEAR('Table'[Date]),MONTH('Table'[Date]),01)

    Final you will see the below:

    And you could use the new column and delete before column then rename new column .

     

     

    Wish it is helpful for you!

     

    Best Regards

    Lucien

3 Replies

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

    Hi Anonymous ,

    Try like below:

    Step1,change date type to date:

     

    Step 2, use the following dax to create new date column:

    datenew = DATE(YEAR('Table'[Date]),MONTH('Table'[Date]),01)

    Final you will see the below:

    And you could use the new column and delete before column then rename new column .

     

     

    Wish it is helpful for you!

     

    Best Regards

    Lucien

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for your help

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

    Hi Anonymous ,

    Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.

     

     

    Best Regards
    Lucien