Forum Discussion
date format from numbers
- Anonymous2 years ago
Hi Mr_Stern ,
Thanks for the reply from rajendraongole1 .
Here is the sample data I created:
Date
20181212
20201008
20210305
20220608
20231115
20240520
Check in Power Query that the column is formatted as Text.
Add a custom column:
Date.FromText(Text.Start([Date], 4) & "-" & Text.Middle([Date], 4, 2) & "-" & Text.End([Date], 2))Check whether the format of the custom column is Date. In this case, the Date format is mm/dd/yyyy.
Exit Power Query.
There are two ways to change the format of the custom column to dd/mm/yyyy.
- Change directly on the tab.
- Create a measure:
Formatted Date = FORMAT(MAX('Table'[Custom]), "dd/mm/yyyy")The page effect is as shown below:
If you have any other questions, please feel free to contact me.
The pbix file is attached.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi Mr_Stern ,
Thanks for the reply from rajendraongole1 .
Here is the sample data I created:
|
Date |
|
20181212 |
|
20201008 |
|
20210305 |
|
20220608 |
|
20231115 |
|
20240520 |
Check in Power Query that the column is formatted as Text.
Add a custom column:
Date.FromText(Text.Start([Date], 4) & "-" & Text.Middle([Date], 4, 2) & "-" & Text.End([Date], 2))
Check whether the format of the custom column is Date. In this case, the Date format is mm/dd/yyyy.
Exit Power Query.
There are two ways to change the format of the custom column to dd/mm/yyyy.
- Change directly on the tab.
- Create a measure:
Formatted Date = FORMAT(MAX('Table'[Custom]), "dd/mm/yyyy")
The page effect is as shown below:
If you have any other questions, please feel free to contact me.
The pbix file is attached.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!