Announcements
I have textboxes in my app that are pulling date/time data from our sql database. The sql database has 3/15/2017 11:27:34 AM, the textbox displays 3/15/2017 7:27:34 AM. The textbox is set to display Parent.Default, how can I get this to show the correct time? I can get it to display correctly by using ThisItem.Created + 4/24 on the parent but if I do that then I have to update the app everytime we go through the stupid daylight savings change.
The SQL datetime is in UTC so it is being correctly converted to local time when displayed. If you want to see it in UTC then try
Text(ThisItem.Created, "UTC")
The SQL time is in local time not UTC. That's the problem, Powerapps is converting it when it shouldn't. I got rid of the problem by converting the column to varchar instead of datetime so Powerapps will leave it alone and just display the data. We use this database with other applications and it's all local so using UTC will only cause problems when it's not needed.
How can it be in local time if its on a SQL Server? Where is the server located?? Most data sources store datetime in UTC because that is the only format that makes any sense. (Excel is the exception, which stores datetime in a timezone-less way which has its own unique problems). What if one client of the DB is on the East coast, and another on the West coast? They both need to read the datetime and get the same value, which has to be UTC. Both can covert to local time for display purposes, which is what my sample did.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 379 Most Valuable Professional
11manish 203 Super User 2026 Season 2
MS.Ragavendar 128 Super User 2026 Season 2