cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
aa1
Level: Power Up

PowerApps returning ISO duration instead of time

I've got a PowerApp embedded in Power BI with a SQL Server as the data source. The SQL Server has a time(7) attribute that I write to from PowerApps with Text Input. I enter it in as a string (ie. '7:00') and it writes fine. The problem is when I try to reference that attribute, it's stored as a duration instead of time. In the case where I enter in '7:00', SQL Server will return PT7H. I've found that this is an ISO 8601 standard for displaying a duration of time (Period of Time, 7 Hours). My question is: how can I change the formatting from date to time? I'd like to be able to filter based off of the content of this attribute, but I can't if what's being stored is different from what I enter in. 

2 REPLIES 2
Community Support Team
Community Support Team

Re: PowerApps returning ISO duration instead of time

Hi @aa1,

 

Could you please share a screenshot of the issue on your side?

Do you want to convert the ISO duration into time format when you saving back to SQL table data source within your app?

 

If you want to convert the ISO duration into time format when you saving back to SQL table data source within your app, I afraid that there is no way to achieve your needs in PowerApps currently.

 

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
aa2
Level: Powered On

Re: PowerApps returning ISO duration instead of time

@v-xida-msft

 

It should never be an ISO duration in the first place. When I enter in '7:00', I am expecting the SQL table to store 7:00 am and not 7 hour duration. When I query the table from SSMS or Power BI, I get '7:00', but when I call the same field in PowerApps, I get 'PT7H'. 

 

I am confused why PowerApps changes the format and would like to prevent that from happening. 

 

edit: I'm the OP. Looks like I logged into a different account.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 274 members 3,380 guests
Recent signins:
Please welcome our newest community members: