Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I have a classical Date&Time column in my database.
I would need to add a new column generated from year, month and day.
For example: 20160905 for the 5th of september 2016.
Thank you,
Nandor
Solved! Go to Solution.
Nandor -
Try this: DateInt = ([Year]*10000)+([Month Nbr]*100)+[DayOfMonth])
Hi,
Some very valid suggestions, my personal choice would be to have the following calcualted column:
=FORMAT ( [YourDateField], "YYYYMMDD" )
Cheers
All excellent solutions!
1. Date.ToText([DateColumn], "yyyMMdd")
2. DateInt = ([Year]*10000)+([Month Nbr]*100)+[DayOfMonth])
3. =FORMAT ( [YourDateField], "YYYYMMDD" )
thanks everyone!
Hi,
Some very valid suggestions, my personal choice would be to have the following calcualted column:
=FORMAT ( [YourDateField], "YYYYMMDD" )
Cheers
Nandor -
Try this: DateInt = ([Year]*10000)+([Month Nbr]*100)+[DayOfMonth])
In Power Query/M you could use:
Date.ToText([DateColumn], "yyyMMdd")
Thank you!
All three solutions work perfectly.
Best regards,
N
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
88 | |
85 | |
68 | |
68 | |
64 |
User | Count |
---|---|
210 | |
118 | |
116 | |
81 | |
74 |