cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
akharns
Helper V
Helper V

Dates and Time Zones

I have a date that has been stored in an Excel file. It does not have a time in it.  My local time zone is Pacific, 8 hours earlier than GMT.  When I try to display the date PowerApps, it consistently shows one day earlier than it should.  I thought maybe PowerApps is adding a zero time and then considering it to be GMT, but that would have resulted in a later time, not an earlier time.  I am not currently making any time zone corrections, which I don't actually think would be possible for a date without a time.  How can I work around this, so I can display the correct date?

1 ACCEPTED SOLUTION

Accepted Solutions

Whatever gets the job done.  I mean, that's the proper maxim here, right?

 

If the issue is solved for now please close the thread. 😉

View solution in original post

6 REPLIES 6
mdevaney
Super User III
Super User III

@akharns 

Have you tried playing around with TIMEZONEOFFSET?

DateAdd(your_date_field),TimeZoneOffset(your_date_field),Minutes)
DateAdd(your_date_field),-TimeZoneOffset(your_date_field),Minutes)

 

More info at the bottom of this MS Documentation

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-dateadd-datediff

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

How can you do that when you haven't stored a time?

Do I need to assume that PowerApps will always incorrectly translate my dates, so I always need to convert them back by subtracting 1?

@akharns 

Yes, if you don't care about the time then just subtract by 1 like this.

DateAdd(your_date_field,-1,Days)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Ok.  I don't like it but at least I know.  Thanks

Whatever gets the job done.  I mean, that's the proper maxim here, right?

 

If the issue is solved for now please close the thread. 😉

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,345)