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.
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
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.
User | Count |
---|---|
140 | |
140 | |
77 | |
73 | |
71 |
User | Count |
---|---|
230 | |
174 | |
72 | |
69 | |
60 |