Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Rookarumba
Helper III
Helper III

PowerQuery: need help for date.fromtext

Hi All,

 

I'm wondering what went wrong with "date.fromtext".

https://msdn.microsoft.com/en-us/query-bi/m/date-fromtext

 

I tried it in Excel 2016 and PowerBI Desktop April update

 

On my end, I tried,

Date.FromText("2010-02-19") equals Date,yyyy-MM-dd

and 

Date.FromText("2010-02-19") equals Date,yyyy-MM-dd

 

and both showed "Token Eof expected" and the error is on 'equals'

 

Will anyone be able to advice what went wrong?

 

Many Thanks

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi Rookarumba,

 

Date.From("2010-02-19") is a function, "Date.FromText("2010-02-19") equals Date,yyyy-MM-dd" from MSDN is description which explain that you can achieve a date type result when use Date.From() function.

 

Regards,

Jimmy Tao

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

Hi Rookarumba,

 

Date.From("2010-02-19") is a function, "Date.FromText("2010-02-19") equals Date,yyyy-MM-dd" from MSDN is description which explain that you can achieve a date type result when use Date.From() function.

 

Regards,

Jimmy Tao

Thanks, that work 🙂

Anonymous
Not applicable

I think date.FromText doesn't work in power bi, try below:-

 

Column = Format("2010-02-19","Short Date") 

 

https://msdn.microsoft.com/en-us/query-bi/dax/format-function-dax

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.