Forum Discussion
Anonymous
7 years agoNot applicable
How do I create a date field using a text field that has year and month only.
I have a text field that contains year and month only (ex '201801'). How do i create a date field using this text field. Thanks! Sallee
- 7 years ago
Well, in DAX you could do this:
Column = DATE(INT(LEFT([Column1],4)),INT(RIGHT([Column1],2)),1)
Anonymous
7 years agoNot applicable
Hi, I have this formula
Businessdate = DATE(LEFT([BUS_YEAR_MTH],4),MID([BUS_YEAR_MTH],5,2),1)
but it is giving me this error:
Expression.Error: The name 'DATE' wasn't recognized. Make sure it's spelled correctly.
Thanks for your help!
Sallee
bogomda
Resolver I
7 years agoworks fine for me. try to use this sample as per link below.
https://1drv.ms/x/s!AhUWZ84uo7UAgmM8kvkwm1THdmsj
Alternative solution, Greg offered, should also work fine, use either one.