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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
wlknsnBI
Helper II
Helper II

Power Query Date Format Conversion (single step)

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?

1 ACCEPTED SOLUTION
AnkitBI
Solution Sage
Solution Sage

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.

View solution in original post

1 REPLY 1
AnkitBI
Solution Sage
Solution Sage

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.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors