cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Dates entered in Display form are different from dates entered in Edit form of my Canvas app

In my app I have two date pickers to store a Start Date and an End Date. I have removed the hours and minutes (not made invisible).

When I enter dates they are stored in an Excel table in a mm/dd/yyyy hh:mm:ss AM/PM format and a date one day before the day that I have entered, This is not the problem.

 

When I check the Display form I see strange things.

Entered                                     in Excel                                   Display form                           Edit form

14/11/2019 and 22/11/2019   13/11/2019 and 21/11/2019  11/14/2019 and 11/22/2019   14/11/2019 and 22/11/2019

01/12/2019 and 31/01/2020   30/11/2019 and 30/01/2020  12/1/2019   and 1/31/2020     01/12/2019 and 31/01/2020

15/11/2019 and 15/02/2020   11/14/2019 and 2/14/2020    11/15/2019 and 2/15/2020     15/11/2019 and 15/02/2010

 

In the Edit form I was able to set the Format to "dd/mm/yyyy" to display the dates in the correct form.

In the Display form the text property of the Label displaying the date is set to DateValue(Parent.Default)  and then the dates are displayed in the dd/mm/yyyy format.

When, in the Dispay form, I change the text property of the Labels displaying the dates to DateValue(Parent.Default, "nl") something strange happens.

14/11/2019 and 22/11/2019 are displayed as  2/11/2020 and 10/11/2020   one year minus 12 days later

01/12/2019 and 31/01/2020 are displayed as  1/12/2019 and 7/1/2022  first date correct, second date two years minus 24 days later.

15/11/2019 and 15/02/2010 are displayed as  3/11/2020 and 3/2/2021   one year minus 12 days later

I have tried to set the Text property to DateValue(Parent.Default, "dd/mm/yyyy") but then the label does not display anything.

 

What can I do to solve this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Dates entered in Display form are different from dates entered in Edit form of my Canvas app

Removing the time portion of a date time doesn't actually remove the time.  It just has the time default to midnight UTC.  I believe that is one of the primary reasons why you are getting the date shift.  The other is regional settings.  The display of some of your dates is switching from "MM/dd/yyyy" to "dd/MM/yyyy".  This is normally caused by regional settings being different between your O365 tenant, your local browser and settings in PowerApps.  Take a look at this article on how to set regional settings in PowerApps.

https://docs.microsoft.com/en-us/powerapps/user/set-personal-options



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

View solution in original post

1 REPLY 1
Highlighted
Dual Super User
Dual Super User

Re: Dates entered in Display form are different from dates entered in Edit form of my Canvas app

Removing the time portion of a date time doesn't actually remove the time.  It just has the time default to midnight UTC.  I believe that is one of the primary reasons why you are getting the date shift.  The other is regional settings.  The display of some of your dates is switching from "MM/dd/yyyy" to "dd/MM/yyyy".  This is normally caused by regional settings being different between your O365 tenant, your local browser and settings in PowerApps.  Take a look at this article on how to set regional settings in PowerApps.

https://docs.microsoft.com/en-us/powerapps/user/set-personal-options



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

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,792)