cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shay8080
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
v-yutliu-msft
Community Support
Community Support

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

8 REPLIES 8
eka24
Super User
Super User

Already tried that, not works for me 

 

Pstork1
Dual Super User
Dual Super User

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.
v-yutliu-msft
Community Support
Community Support

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.

Thanks !!

This Solution Works Perfect !! 😀

Mark the answer as a solution
Madiko
Frequent Visitor

it doesn't work for me. Nothing changed when I follow this solution. I still have time stamp in my excel file. Can anyone help? I need to remove timestamp from excel when I submit a form in PowerApps.

Pstork1
Dual Super User
Dual Super User

The time stamp in Excel is dependent on the formatting of the Excel column, not the way the time is submitted from Power Apps.  Make sure the Excel cells are formatted as either Short Date or Long Date, not one of the custom date formats.



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

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,185)