Forum Discussion
Support for ISO 8601 Date Time format DateTime.ToString("O") unfortunately missing
- Anonymous8 years ago
ericleigh007,
After I enter the key, I am able to directly change the data type of the columns to Date/Time. I am using the latest version of Power BI Desktop(2.52.4921.682 ). In your scenario, please first convert the data type of these columns to Date/Time in Query Editor as described in my first reply, click "Close & Apply" , then you will be able to create calculate column in Data View as shown in the following screenshot.
Regards,
Lydia - 8 years ago
So thanks, Lydia,
This is not really a solution. This is a workaround using the query editor, and it works very well.
but the DAX level offers "Modeling" change type, which doesn't work.
Obviously, if the query editor can do this, the Modeling tab should also be able to. In fact, if the Modeling logic in the load worked like query editor, it would have automatically recognized the field as date/time, like other services do.
Thsi is not a matter of "can I do it", it is a matter of "does the tool work as expected"? In this case, I can do it, but the workaround should not be necessary. I changed the title to be more clear about that.
Please submit a bug to the team indicating that the Modeling tab at the DAX level should work properly here.
-thanks very much for you help.
-e
ericleigh007,
When I test the above data in November update of Power BI Desktop, I can directly convert the column to Date/Time type or add a custom column using DateTime.FromText function to convert the type. You can review the following screenshots.
Regards,
Lydia
I will have to loo at my data in detail, for MY DATA cannot be converted to the DateTime dta type. There could be a l8ne that is mlformed somehow. As usual, a more descriptive 3rror message wo7ld have helped.
Let me g3t soe time for ivetigsationand I will share my fringe.
Thaks for such a great product.