I have a field in CDS called 'Start Date'. In CDS, this field is set to 'Date Only'
When I display this field in a form on PowerApps the date shows correctly.
When I display the same date in a display picker it shows the previous date. The date picker is set to UTC.
See the following example:
The correct date is 1/20/2018 but the date picker shows 1/19/2018
Details on the field in CDS:
Field displayed in form in PowerApp
Field displayed in date picker in PowerApp
Which Time Zone is your local time zone? Is it the UTC?
I have made a test on my side, and don't have the issue that you mentioned.
Based on the screenshot that you provided, I think there is something wrong with the DateTimeZone property you set for the Date Picker control.
Please take a try to modify the formula within the DateTimeZone property of the Date Picker control into following:
DateTimeZone.Local /* <- Please change the Date Time Zone of the Date Picker control to your local time zone rather than UTC*/
then check if the issue is solved on your side.
Yes, updating the timezone to local shows me the correct time but this does not resolve my issue.
Firstly, my timezone is UTC+2 so both UTC and Local should show the correct date whereas in reality the UTC setting shows it to be 24 hours earlier than the date saved in CDS.
Secondly we have a large user base in the US and when we set the date picker to 'local' they see all the dates as one day previous to the date saved in the CDS as they are UTC-5. It was for this reason we switched all our pickers to UTC in the hope that they would always display the same date as the one saved in the CDS.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Check out the Power Apps Community Call for January 2021
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!