Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Applicable88
Impactful Individual
Impactful Individual

How to convert number format like 202104 into date in PowerQuery M?

Hello,

I want to convert 202104 into a a date format. How do I extract those numbers to make month and year of it? 

Thanks.

 

Best. 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Applicable88 ,

Try a new column in M

=#date(Number.FromText(Text.Start([Column],4)) ,Number.FromText(Text.End([Column],2)),1)

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Applicable88 ,

Try a new column in M

=#date(Number.FromText(Text.Start([Column],4)) ,Number.FromText(Text.End([Column],2)),1)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.