Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I'm getting dates back from an api which are either like (I can choose):
| 15/01/2020 15:03 |
or
| 2020-01-15T14:03:17Z |
I would like to have these automatically set as Date field (so excluding time). Right now, they are considered both as Text by Power Query.
Until now, I've always used the first type and added two steps:
1) convert to date/time
2) convert date.
=> Skipping step 1 returns an error.
Is there a faster way to do this? For example wrapping a certain formula around these fields?
Solved! Go to Solution.
Hi @wlknsnBI
Don't think there is one way process to convert as value is in DateTime. You can combine step1 and 2 in a single step like below.
= Table.TransformColumnTypes(Table.TransformColumnTypes(Source,{{"Column1", type datetime}}),{{"Column1", type date}})
Thanks
Ankit Jain
Do Mark it as solution if the response resolved your problem. Do Kudo the response if it seems good and helpful.
Hi @wlknsnBI
Don't think there is one way process to convert as value is in DateTime. You can combine step1 and 2 in a single step like below.
= Table.TransformColumnTypes(Table.TransformColumnTypes(Source,{{"Column1", type datetime}}),{{"Column1", type date}})
Thanks
Ankit Jain
Do Mark it as solution if the response resolved your problem. Do Kudo the response if it seems good and helpful.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 56 | |
| 33 | |
| 32 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 45 | |
| 30 | |
| 28 |