Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Team,
I use the M language Date.WeekOfYear(Date.From(DateTime.LocalNow()), Day.Monday) to get to the current week number, the value is 14 for today. But I want to get as 1914, is it possible?
if no, I think I can get the last two digits of the year, such as 2019, to get 19, do you know how to do with M language?
Thank you!
Solved! Go to Solution.
@hemingt Please try this as a Custom Column in Power Query to get the last two digits of the current year or any date field from the table.
=Text.End(Date.ToText(DateTime.Date(DateTime.LocalNow())),2)
Proud to be a PBI Community Champion
@hemingt Please try this as a Custom Column in Power Query to get the last two digits of the current year or any date field from the table.
=Text.End(Date.ToText(DateTime.Date(DateTime.LocalNow())),2)
Proud to be a PBI Community Champion
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |