web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Datepicker returns min...
Power Apps
Answered

Datepicker returns minus 1 day

(0) ShareShare
ReportReport
Posted on by 313

Working with Powerapps 2.0.460, Windows 10, IPad app, connection to SQL Azure (for Access Web App in Sharepoint online), local settings for UK on PC and Ipad, date format dd/mm/yyyy

 

The date returned to the server from a DatePicker control is consistently one day less than the date entered. So enter, say, April 7th 2016 on the PowerApp Datepicker (either from F5 on the PC or from the app on the IPad), save, look at the SQL AZure record and it has April 6th 2016. Same over a month boundary - enter 1st May, get 30th April.

 

The card Update setting is valDateOfBirth.SelectedDate. I've tried Text(valDateOfBirth.SelectedDate,"dd/mm/yyyy") as well but the result is the same.

 

Looks like a bug...??

Categories:
  • Verified answer
    Steelman70 Profile Picture
    873 on at

    Hello, this definitely sounds like an issue of time zones.  You can check this by putting a text box in your PowerApp and displaying the date field without any formatting.  It should show something like this:

    CaptureDateStrange.PNG

    As you can see in my example I have a one hour extra, so I don't have issues when chopping off the time.

    In your case, I suspect that the date gets saved with a few hours before midnight the previous day, so you get one day less when you only take the date part.

    I imagine that the newly available date picker property called DateTimeZone which you can set to either Local or UTC holds at least part of the key to the solution.  I have not tested this, but just noticed it today.  It is not even included in the online specification for the date picker control.  Otherwise you can try to add n hours to the date picked by the date picker before wiriting back to the database.

    In any case please let me know how you get on.

  • JonathanGibbs Profile Picture
    313 on at

    Yes, you're right! I changed the subtype of the date field within the Access Web App to DateTime instead of Date, and saw that what it was getting back from PowerApp was 06 April 2016 23:00. Of course, it's taking an hour off for Daylight Saving Time (British Summer Time at the moment). Stupid me.

     

    Changed the DateTimeZone property of the Power App DatePicker control to UTC instead of Local, and the correct 07 April 2016 00:00 comes through to the server.

     

    Thanks!

  • Steelman70 Profile Picture
    873 on at

    You are welcome.

     

    Given that you are also in Europe, you may want to support this idea:

    https://powerusers.microsoft.com/t5/PowerApps-Ideas/Date-picker-option-to-start-week-on-a-Monday/idi-p/2851

     

    Also, if you use Access Web Apps this might be one for you too:

    https://powerusers.microsoft.com/t5/PowerApps-Ideas/PowerApps-must-also-see-SQL-Azure-Queries-not-only-Tables/idi-p/863

  • jeffgeno Profile Picture
    39 on at

    This isn't actually solved and it's still a bug.

     

    Set the date and time picker to UTC. Use the Collect function to send the date to a SharePoint list.

     

    Select Today - Date comes through as today, 12:00am

    Select Tomorrow - Date comes through as tomorrow, 12:00am

    Select Yesterday - Date comes through as NOW, today at the current time

    Select the Day Before Yesterday - Date comes through as the day before yesterday, 12:00am

     

    So there's clearly some bug sending yesterday's date to SharePoint.

  • hpkeong Profile Picture
    2,944 on at

    Hi

     

    I have reported earlier to PG in private email and it was indeed a bug, and nothing to do with UTC or local time setting. If things needs further settingm, then Microsot will be in big trouble.

     

    PG has tested together with me that:

    1. When using Create App from Data, the Datepicker will show correct Date

    2. If Datepicker is created manually, the date will be different by one day if the Properties of the Date in the CDM entity is Date.

     

    So, temporary measure is DON;T use Date properties but instead, use TEXT, and create our own DatePicker and AL are solved (while awaiting bug fixing).

     

    My ideas:

    - If things need furhter elaboration or special setting, then it is better report to PG as it is definitely a bug.

     

    Sharing with gratiture.

  • jeffgeno Profile Picture
    39 on at

    Thanks for the suggestion. I can confirm that setting the SharePoint list column to a single line of text rather than date and time works correctly. That's going to cause problems on the SharePoint side of things, but since the list will mostly be analyzed in Excel, we can mostly work around it. This should work properly with the right data types.

  • CarlosFigueira Profile Picture
    Microsoft Employee on at

    There was a bug in sending dates to the connectors that was fixed in the latest release (2.0.500). I tried a simple scenario: sending dates to sharepoint, both via the App From Data and directly with the Collect function (while retrieving the date from DatePicker.SelectedDate), and the date was saved correctly in the SP list.

     

    Could you try your scenario again with the new release to see whether you still see the problem? Thanks!

  • hpkeong Profile Picture
    2,944 on at

    Hi Carlos:

     

    Sorry for late reply to test it out.

    Yes, the bugs is finally cleared. Thanks.

     

    Just curious - apart from: Text, Integer, Number, which I can see the protection on Entry by user, I don;t see the use of Date properties if I am creating my apps without using Display Form or Edit Form. Maybe most of the time I am writing from scratch.

     

    Anyway, thanks a have a nice day.

  • jeffgeno Profile Picture
    39 on at

    I can also confirm that this is resolved. Thanks!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard