Forum Discussion
How to convert text 20150714 to date?
- 9 years ago
Hi Anonymous,
As the text value "20150714" is not formatted as standard date format, it's not able to convert it to Date data type directly.
In your scenario, you can try the DAX shared by joerykeizer,
Also you can create a Custom Column in Query Editor follow below formula:
=Date.FromText(Text.Range([Column1],0,4)&Text.Range([Column1],4,2)&Text.Range([Column1],6,2))
Best Regards,
Qiuyun Yu
Hi Anonymous,
As the text value "20150714" is not formatted as standard date format, it's not able to convert it to Date data type directly.
In your scenario, you can try the DAX shared by joerykeizer,
Also you can create a Custom Column in Query Editor follow below formula:
=Date.FromText(Text.Range([Column1],0,4)&Text.Range([Column1],4,2)&Text.Range([Column1],6,2))
Best Regards,
Qiuyun Yu
- Anonymous6 years agoNot applicable
Text To Date
=Date.FromText(Text.Range([Column1],0,4)&Text.Range([Column1],4,2)&Text.Range([Column1],6,2))
Number to Date
=Date.FromText(Text.Range(Number.ToText([Column1]),0,4) & (Text.Range(Number.ToText([Column1]),4,2)& (Text.Range(Number.ToText([Column1]),6,2))))