Forum Discussion
Unable to Convert list output to Date type
Hi,
I have this:
The output needs to be in date type something that Date.StartOfYear() function would produce. I am unable to convert the data type to date type. Kindly help me out.
If I don't get date type from the above formula I get this error:
6 Replies
- Syndicate_AdminAdministrator
If the [Min Date] and [Max Date] columns in that table are Date type then the List.Min should return a Date (and it appears to do so in your pic). Are they Date type? If so, where is that date used and what is the error message for that table/query?
Pat
- CodemunchkinFrequent Visitor
Hi Pat,
The [Min Date] and [Max Date] are not columns they are the output of blank queries with this formula/m code:[Min Date]
[Max Date]
These 2 queries are fed into this date table:
I convert this list to a table ofcourse and then once I exit the query to go to power bi desktop home page I get the error as I posted above.
- Syndicate_AdminAdministrator
The FilterOutUnnecessaryColumns[Min Date] is a column reference that returns a list, and List.Combine is putting those two lists together for List.Min. Also, the pic with the error is only showing that there was an error with another query (not shown in pic), there may not be an issue with the Min Date and Max Date queries. Which query actually had the error?
Pat
- AnonymousNot applicable
Hi Codemunchkin ,
Try Date.From or Date.FromText
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.