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 / Date is different in l...
Power Apps
Answered

Date is different in logic apps

(0) ShareShare
ReportReport
Posted on by 16

Hi,

I have a canvas app that is used to submit information about people, for example date of birth. The data is stored in Dataverse. After the data is submitted an Azure Logic app is triggert. This uses the data from dataverse is an email and sends it. The problem I experience is that the date in the logic app is different from the date that is stored is Dataverse. For example: in the canvas app 18-08-2021 is submitted. This date is also stored in the table. Then when I check the logic app trigger (Dataverse: When a new records is created) the date changed to 17-08-2021. It seems to change between Dataverse and Logic apps. When I check the output of the trigger the date is allready changed. 

 

My first gues would be something with the time zone. But I am not sure...

 

Does anybody experience this issue and know how it can be resolved?

Categories:
I have the same question (0)
  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @jvdl , 

     

    It is because of timezone difference. 

    Please try below formula 

    Patch
    
    DateAdd(Now(), -TimeZoneOffset(), Minutes); 
    
    
  • jvdl Profile Picture
    16 on at

    Hi @PriyankaGeethik ,

    Thank you for your response. Could you clarify where I need to use the formula? When I check the table where the data is stored the values do match the value that has been submitted. To I need to change the formula in the canvas app or in the Logic app? If I need to change it in the Canvas App, on what property should the formula be applied?

     

    Thanks again.

  • Verified answer
    PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @jvdl ,

     

    While patching the record you can use the below formula for all the date controls. It will store the value in UTC format. 

    DateAdd(Now(),TimeZoneOffset(), Minutes); 

     

    And while displaying any date time field in your Powerapps please use the below format in the DateDefault property. This you show the date stored in the UTC format in user local timezone. 

     

    DateAdd(Now(),-TimeZoneOffset(), Minutes); 

     

    This way for all the Logic aoo operations can be performed in UTC format and the date time field will have uniform value in UTC even if multiple users of different time zone will submit the data. 

     

     Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • jvdl Profile Picture
    16 on at

    Hello @PriyankaGeethik ,

    Thank you again for you response. Unfortunately it didn't solve my problem. The data in the logic app, table and Canvas app now show one day earlier than what I submitted. For example: In the app I typed 07-07-2007 in de data field. After submitting the form I see 06-07-2007 in the Canvas app, Dataverse table and in the Logic app.

    Any other Ideas?

  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @jvdl ,

     

    It is because your datasource is in different timezone and not in your local timezone. 

    You can test the below formula to check the date field are getting submitted correctly or not. 

  • jvdl Profile Picture
    16 on at

    Hi @PriyankaGeethik ,

    Thanks again for your help. Because we only need to use the date and not the time I have created a formula that changes the time:

    DateAdd([Datafield];-TimeZoneOffset();Minutes)

    This give the desired result. Thanks again for you help. 

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard