cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Re: Datepicker returns minus 1 day

Did you also check if the Date-field of SharePoint is displayed correctly back again in the App?

 

In my scenario the form has two date fields (Start/End) and the dates are displayed correctly in the Datepicker + even submitted correct to SharePoint. However when I display the item in an Displayform of the app it shows the dates minus one!

 

Here you see SharePoint showing StartDate 5OCT and EndDate 7OCT as submitted through app with DatePicker correctly:

PowerApps_DateWrong_01SP.png

Here you see the app showing both dates minus one back to the app even though in Sharepoint it is stil correct:

PowerApps_DateWrong_02App.png

 

 

 

Steelman70
Level 10

Re: Datepicker returns minus 1 day

Hi, I also still have issues with time zones.  And the Date sub-type in Access Web Apps is no longer visible, you need to turn it into a Date/Time sub-type.  If I travel to a different time zone, my datetimes are off by n hours, and there is no obvious way to display the datetime in the original time zone.

sfreitas
Level: Powered On

Re: Datepicker returns minus 1 day

Hi!

 

I have this problem. 

When I'm trying to save date information to SharePoint's list, I have the record date with 1 day subtracted. 

 

Can anyone help me? 

 

Thanks! 

jeffgeno
Level: Powered On

Re: Datepicker returns minus 1 day

This was solved before, but just showed up again for us today. Some update must have been pushed out that broke it again.

Federal
Level: Powered On

Re: Datepicker returns minus 1 day

Hi Powerapps V2.0.611 can you confirm this is a return of the same issue? I'm using an app created from sharepoint. Originally it was working as expected, then some months ago it started exhibiting the same behaviour. My datepicker TaskDueDate shows the correct selected date in sharepoint irrespective of whether selected in sharepoint or powerapps, but minus 1 day in the app.

If I change the column in sharepoint to text rather than DateTime it displays correctly in the app. If I create a text box in the app to show the output the text box shows the correct date at 00:00:00, but once saved it returns the day previous. 

Re: Datepicker returns minus 1 day

Just noticed this happening again on mine today (Powerapps Version 2.0.650)

Anyone else having this issue pop up again?

 

Strangely enough I've been able to get around it with DateTime columns on SharePoint, however, purely Date ones are not working correctly, consistently saving 1 day prior as well.

 

For anyone interested, I've been able to differentiate between my time zone so it saves back to SharePoint correctly with the example excerpt below:

UpdateContext({departOffsetTime: DateAdd(datePickerDepartDate.SelectedDate+Time(Value(dropDownDepartHour.Selected.Value), Value(dropDownDepartMinute.Selected.Value), 0), -TimeZoneOffset(datePickerDepartDate.SelectedDate+Time(Value(dropDownDepartHour.Selected.Value), Value(dropDownDepartMinute.Selected.Value), 0)), Minutes)});
Megabyte
Level: Power Up

Re: Datepicker returns minus 1 day

Thought I'd update this post since I could not find any good updates on this problem and alot has changed with powerapps since it was posted and is still a common problem.

 

I'm using Azure SQL which saves in UTC timezone (you cannot change timezone in Azure or PowerApps that I am aware of), so when I use a datepicker to filter a dataset, the datepickers in my gallery were coming up a day short, since I am in EST timezone which is 4 hours off UTC.  I'm still experimenting with this, but I believe I found another better solution to the datepicker problem off by a day problem.

 

The datepicker now has a datetimezone property that you can flip between UTC and Local timezone.

 

If you use the Local timezone on the datepicker you are searching with and the UTC timezone in the gallery dataset, this seems to solve the problem of showing the correct dates on the dataset results and still allow you to search with local timezone.

 

I should note, so I do not add to the confusion, that I have NOT found a solution to the filter on datepicker problem, so I've made an extra date column on my SQL view which is a text field to allow my to search since =, >, < date searches still do not work on the filter command with the Azure SQL database.  It seems operator only work on text and number fields.  If there is an fix to this yet, please let me know?

MRNBagtas
Level: Powered On

Re: Datepicker returns minus 1 day

Hi, I encountered this too when my datepicker is set to UTC. OnVisible, it is set to 'TODAY', but it will always return the current date minus 1. So here is the workaround that I did, I set the default value of the datepicker to 'SelectedEventDate' and placed the code below on the OnVisible property of the screen:

 

UpdateContext({SelectedEventDate: DateValue(Text(Today(),DateTimeFormat.UTC))+1 })

 

I hope this helps Smiley Happy

 

Re: Datepicker returns minus 1 day

I was reading this thread, as I am facing the same issue with DatePicker control. I am in Indian Timezone and my date picker is substracting a day from the selected date. 

 

Surprisingly, this was not the issue with the same Application 10 days back. I have no clue on how it started returning -1 day from the selected date.

Highlighted
Tonisv73
Level: Powered On

Re: Datepicker returns minus 1 day

Yeah, started to me as well, UTC+2 timezone, but in app it's set to use UTC timezone, while writing to database, date get's changed to -1.

And also everything worked last week...

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 191 members 3,305 guests
Please welcome our newest community members: