Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! 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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.