Forum Discussion
jpt1228
Responsive Resident
8 years agoConvert 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)
)
Decal
Helper I
2 years agoI would like to see how to do it in dax when coming from text
Ashish_Mathur
Super User
2 years agoHi,
This calculated column formula will work
Date = 1*("1/"&right(Data[YYYYMM],2)&"/"&LEFT(Data[YYYYMM],4))
Hope this helps.