Forum Discussion
Date Formatting MMDDYY from text
- 9 years ago
Hi cgarcia,
As the value "00/00/2000" is not a valid date, when you change the data type to date, the error throws out. You can modify the DAX to get around of this kind of invalid date value:
Column = IF( LEFT(FILE[COLUMN 1],2)="00" && MID(FILE[COLUMN 1],3,2)="00",BLANK(),LEFT(FILE[COLUMN 1],2)&"/"&MID(FILE[COLUMN 1],3,2)&"/"&RIGHT(FILE[COLUMN 1],2)+2000)
Best Regards,
Qiuyun Yu
Hi cgarcia,
As the value "00/00/2000" is not a valid date, when you change the data type to date, the error throws out. You can modify the DAX to get around of this kind of invalid date value:
Column = IF( LEFT(FILE[COLUMN 1],2)="00" && MID(FILE[COLUMN 1],3,2)="00",BLANK(),LEFT(FILE[COLUMN 1],2)&"/"&MID(FILE[COLUMN 1],3,2)&"/"&RIGHT(FILE[COLUMN 1],2)+2000)
Best Regards,
Qiuyun Yu
Hi Qiuyun,
This expression worked perfectly! What if i wanted the value to be today's date instead of a blank?
Regards,
Chris