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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Records showing either...
Power Apps
Answered

Records showing either correct date or 1-day-wrong date in model driven app.

(1) ShareShare
ReportReport
Posted on by 367

So I have an app that has student records for the current year and projected into the next year. A flow copies data from the current year into the projection year.

When viewed from the model driven app, the Current Year record shows the correct date, but the Projection Year record shows the date 1 day behind.

All date fields are 'Date Only'.

My timezone is UTC-06:00

I can confirm that the date field in each record contains the same data:

datesarethesame.png

 

However, the model driven app displays the data wrong in only one of the records:

datesaredifferent.png

 

In Power Automate, my flow is copying the date from the Current to the Projection record. Here are the inputs and outputs of the flow:

inputsandoutputs.png

Everything looks correct, but the model driven app still shows the date wrong for one of the records.

I can "fix" the problem by setting my Dynamics user preferences to a timezone of GMT-0, but I would rather have a programmatic fix that doesn't involve giving all of my users the wrong timezone.

Any help appreciated.

I have the same question (0)
  • Hamish Sheild Profile Picture
    3,005 Most Valuable Professional on at
    What user account are you using for the Flow connections to CDS? And what is their Timezone setting? It’s possible that the Flow connection user has their Timezone set to UTC-0.

    For future reference, when the date field was created it should have been set as a Date Only type. This avoids this scenario. Typically date fields should be created as Date Only in CDS unless the time component is required. Unfortunately, if you want to change the field to Date Only then you need to create a new field, migrate the data and delete the old field.
  • jzimmermancase Profile Picture
    367 on at
    As a matter of fact, all of my date fields are Date Only, which makes this problem just that much more bizarre.

    Date Only fields don't exclude time data, they just force it to T00:00:00Z, which you can see in the Power Automate output in the screenshots above. As an experiment I used an "add hours" expression and there were no errors, but the time was still T00:00:00Z.
  • Hamish Sheild Profile Picture
    3,005 Most Valuable Professional on at
    OK, good to see you are using date only fields.

    Did you look at the user account that is being used for the CDS connector within the Flow?
  • jzimmermancase Profile Picture
    367 on at

    My own account is the owner on the flows. Its time zone settings are configured through the Exchange server and synced, as follows:

     

    Capture.PNGAll of the affected users have their time zones configured as UTC-06:00. This shouldn't matter, because in theory Date Only fields ignore time zone.

    Here's another view of the symptom. You can see each student has a 19-20 and a 20-21 record. And you can see the the 20-21 records' dates are all 1 day earlier. They should be the same.

    datesdontmatch.png

     

    HOWEVER, Power Automate doesn't see this at all--it thinks the dates are the same. Here is the output of a "List Records" step from the same entity. Date fields are in red. This is the same student circled in red above.

     

    datesthesame2.png

    Canvas Apps has a different opinion.

    timesaredifferent.png

     

    Aha! So Power Automate is altering the data based on the owner's (my) timezone. It looks like it's subtracting 5 or 6 hours.

     

    So how do I fix this? Should I make a post in the Power Automate community instead?

  • Nhelgren Profile Picture
    on at

    Have you checked the time zone for the user that is having the issue?

  • jzimmermancase Profile Picture
    367 on at

    Yes, they are on UTC-06:00 'Central Standard Time'. Everybody is.

    On a lark, I tried:

    convertTimeZone(triggerOutputs()?['body/case_mostrecentiepmeeting'],'Central Standard Time','UTC')
    But this has no effect. Power Automate keeps inputting the date minus 6 hours.
    I also tried:
    t000000z.PNG
    And:
    t060000z.PNG
    But they both result in:
    result.PNG and 
    01062020.PNG and
    argh.PNG
     
  • jzimmermancase Profile Picture
    367 on at
  • Verified answer
    jzimmermancase Profile Picture
    367 on at
  • micahthobbs Profile Picture
    26 on at

    Anyone know why I might be getting this Access Denied when following the solution link? Thanks.

    CleanShot 2022-09-14 at 14.03.08@2x.png

  • JPS_PowerApps Profile Picture
    6 on at

    I was also unable to reach this page. The fix for me on this was going into the column settings in sharepoint, going into advanced settings, and setting the column as timezone independent. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard