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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
cmcnally
Frequent Visitor

Times in Power Query

Hi All,

 

I'm using an XML feed as a datasource and transforming the data to merge it with another local data source. I have a time field from the XML that is in the format "9:30", "10:30", "18:00" etc. Is there a way to add the 0 prefix to the "9:30" time so that it is "09:00"?

 

Thanks

1 ACCEPTED SOLUTION
m_dekorte
Resident Rockstar
Resident Rockstar

Hi @cmcnally,

 

If the column is set to type time as well you can use this function:
Time.ToText([ColName], [Format="hh:mm", Culture="en-US"])

 

Note that this will convert the value to type text:

m_dekorte_0-1718708899152.png

 

When the value is already stored as text, then use Text.PadStart, as shown here:

m_dekorte_1-1718709020069.png

 

I hope this is helpful

View solution in original post

4 REPLIES 4
ronrsnfld
Super User
Super User

In Power Query, if the data is typed as `time`, it will display in the format of your computer's windows regional settings. If you load it into Power BI, you can set the format for that column (`hh:mm`)

 

If it is typed as `text`, then you can use the text manipulations discussed by @m_dekorte , but you won't be able to perform any calculations.

Thank you @ronrsnfld 

m_dekorte
Resident Rockstar
Resident Rockstar

Hi @cmcnally,

 

If the column is set to type time as well you can use this function:
Time.ToText([ColName], [Format="hh:mm", Culture="en-US"])

 

Note that this will convert the value to type text:

m_dekorte_0-1718708899152.png

 

When the value is already stored as text, then use Text.PadStart, as shown here:

m_dekorte_1-1718709020069.png

 

I hope this is helpful

Thank you @m_dekorte 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.