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
Community Champion
Community Champion

Already tried that, not works for me 

 

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 !! 😀

eka24
Community Champion
Community Champion

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.

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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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