cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Date Picker Sends Wrong Date

Hi, 

I am working with powerapps by using excel file that saved on my oneDrive.

I have an issue with dates.

The user selects a date by using the date picker 

the date look ok on the UI but, the excel got the wrong date  ( minus one day ) 

see pictures

 UI.PNGexc.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Date Picker Sends Wrong Date

Hi @Shay8080 ,

Do you mean that the time in Excel is different from the time loading in PowerApps?  

The reason why you met this problem is that:

Excel's default time zone is UTC.

PowerApps' default time zone is local time zone.

So when PowerApps load time, it will transfer to local time automatically.

 

In order to solve the problems mentioned above,I suggest you save local time to Excel and load time in PowerApps as local time too.   //make time zone the same.

I’ve made a similar test for your reference:

Step1:Set the Default of the Date DATA CARD (not the Default on the Date picker) to

DateAdd(ThisItem.Date,TimeZoneOffset(),Minutes)

Step2:Set the Update of the Date DATA CARD (not the Default Date on the Date picker) to

DateAdd(DateValue10.SelectedDate,-TimeZoneOffset(),Minutes)

Step3:Make sure the Date time zone properties of the date picker control is “Local”

 

 

Best Regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Highlighted
Super User III
Super User III

Re: Date Picker Sends Wrong Date

Highlighted
New Member

Re: Date Picker Sends Wrong Date

Already tried that, not works for me 

 

Highlighted
Dual Super User III
Dual Super User III

Re: Date Picker Sends Wrong Date

The post @eka24 referenced is the right solution.  The problem is that Dates always contain a time component.  When the user picks a date using the date picker its defaulting to midnight on that date in the user's current timezone.  But when it saves it to Excel its converting to UTC, which is evidently two hours before your current timezone. So the date becomes yesterday at 10:00 PM UTC instead of today at midnight local time. 

 

To fix it you need to adjust the time added to the date picker when it stores the value in Excel.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Community Support
Community Support

Re: Date Picker Sends Wrong Date

Hi @Shay8080 ,

Do you mean that the time in Excel is different from the time loading in PowerApps?  

The reason why you met this problem is that:

Excel's default time zone is UTC.

PowerApps' default time zone is local time zone.

So when PowerApps load time, it will transfer to local time automatically.

 

In order to solve the problems mentioned above,I suggest you save local time to Excel and load time in PowerApps as local time too.   //make time zone the same.

I’ve made a similar test for your reference:

Step1:Set the Default of the Date DATA CARD (not the Default on the Date picker) to

DateAdd(ThisItem.Date,TimeZoneOffset(),Minutes)

Step2:Set the Update of the Date DATA CARD (not the Default Date on the Date picker) to

DateAdd(DateValue10.SelectedDate,-TimeZoneOffset(),Minutes)

Step3:Make sure the Date time zone properties of the date picker control is “Local”

 

 

Best Regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
New Member

Re: Date Picker Sends Wrong Date

Thanks !!

This Solution Works Perfect !! 😀

Highlighted
Super User III
Super User III

Re: Date Picker Sends Wrong Date

Mark the answer as a solution

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,573)