Forum Discussion
jpt1228
8 years agoResponsive Resident
Convert YYYYMM to date
Hello, I have searched all over and I see many folks have the opposite issue. I have a date column that is YYYYMM and I need to convert it into a date the date table can recognize. When I add a c...
- 8 years ago
Figured it out - Converted the YYYYMM Column to text and then added new column and used this code.
=Date.FromText( Text.Range([Input Date as Sting], 0,4) & "-" & Text.Range([Input Date as Sting], 4,2)
)
MarcelBeug
8 years agoCommunity Champion
Is your YYYYMM column: text or numeric?
Are you looking for a DAX or a Power Query (M) solution?
What is your code so far?
Decal
2 years agoHelper I
I would like to see how to do it in dax when coming from text
- Ashish_Mathur2 years agoSuper User
Hi,
This calculated column formula will work
Date = 1*("1/"&right(Data[YYYYMM],2)&"/"&LEFT(Data[YYYYMM],4))
Hope this helps.