cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alexlrca
Helper I
Helper I

[EDIT FORM] Time input increments by 1 hour at each refresh

Hi PowerApps Community!

 

[CONTEXT]

I developed a PowerApps Canvas App for my company.

The database of the app is an Excel file located in a OneDrive folder. 

The app contains an Edit Form, which is connected to the database, where users can select the start time of several events through drop-downs (one for the hour, one for the minute). 

(Pictures are below!)

 

[PROBLEM]

The form is linked to a drop-down where users can select a flight number. Then, according to the flight number selected, the data of the flight is retrieved from the database and displayed in the form, so that the user can modify the data of the flight. 

 

Since I think it is much easier to understand a problem with some pictures, please refer to the pictures below when reading this paragraph.

(1): Data from flight 38094 is displayed. Time for ATA & ATD is 21:00 (red box). 

(2): Switch to flight 38095

(3): Data from flight 38095 is displayed

(4): When switching back to flight 38094, the TIME HAS INCREMENTED AUTOMATICALLY by one hour.. Therefore becoming 22:00.

 

I carried out an additional analysis and the outcome is the following: the time increment happens when the data from the database is loaded into the form (and not the opposite). Therefore, somehow, PowerApps adds 1 hour to the data from the database.

 

Keep in mind that the drop-downs for the time are actually part of standard "Date & Time" datacards which were customized with the following parameters: the Date Pickers were set to invisible, and their Date Format were set to DateTime.UTC.

 

If I can provide any additional piece of information that could help, please let me now!

 

automatictimeincrement.png

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @alexlrca ,

 

Is there the form submitted to Excel before switching flights? Is your local time zone one hour apart in UTC?

I have made a test, the date increment happens when submitting the UTC data from form to excel.

Please check the time zone of Office365, set it to your local time zone. In PowerApps, also set the time zone of DatePicker to Local.

Snipaste_2019-12-18_17-44-20.png

Best regards,

Sik

View solution in original post

2 REPLIES 2
v-siky-msft
Community Support
Community Support

Hi @alexlrca ,

 

Is there the form submitted to Excel before switching flights? Is your local time zone one hour apart in UTC?

I have made a test, the date increment happens when submitting the UTC data from form to excel.

Please check the time zone of Office365, set it to your local time zone. In PowerApps, also set the time zone of DatePicker to Local.

Snipaste_2019-12-18_17-44-20.png

Best regards,

Sik

Hi @v-siky-msft ,

 

First of all, thank you for your reply!

 

  • The form is submitted to Excel when selecting the Flights Dropdown (the SubmitForm function is written in the OnSelect property of the Flights Dropdown).

 

  • In my test: I selected 22:00 in a dropdown. Then, I switched flights (the data is sent to Excel). In Excel, the data saved is 22:00, which is the time I entered in the dropdown. Then, I switched flights again and came back to the previous flight. The dropdown shows 23:00. But still, in the Excel file, the data is 22:00.

 

  • Indeed, my local time is UTC+1. However, the app may be used in many locations worldwide, with different time zones. This is why I set the time zone of the DatePickers to UTC.

 

  • Unfortunately, I don't have access to the Language and Time Zone settings in the Settings tab of Office365. I don't have admin privilege, maybe that's the root cause?

 

Best regards,

 

Alex

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,091)