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 Automate / When getting the date ...
Power Automate
Unanswered

When getting the date from Dynamics, the date is 1 day behind

(0) ShareShare
ReportReport
Posted on by 71

Good Day Community,

 

I have created a Flow that has a DELAY UNTIL step which is supposed to delay until a specific date which is displayed within the Dynamics 365 form - the issue is that when I add the date dynamically to the DELAY UNTIL step, the date is 1 day behind the date in Dynamics 365. (😕)

 

This is what the field looks like in Dynamics 365

Flow response 1.JPG

 

As you can see below, the date I am receiving back is 1 day behind.

Flow Response.JPG

 

I need to know what expression I can enter to force this date to the right date, in fact I need the date to be 2020-01-06T23:5900Z so that this date can essentially be used as an expiry time.

 

Below is what is currently in the Delay Until field.

Flow response 2.JPG

 

You help will be greatly appreciated..

 

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @logixcrm 

     

    Try using action Convert Time Zone. Set the right destination time.

     

    image.png

  • logixcrm Profile Picture
    71 on at

    Thank you for the feedback, however, the output returns the same value as the input even if I set the output to +3 or +4

     

    time zone.JPG

  • Verified answer
    abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @logixcrm 

     

    Thanks for your quick reply.

     

    Please follow the below steps:

     

    image.png

     

    The expression I used is as follows:

     
    formatDateTime(variables('CRMDate'),'yyyy-MM-ddT23:59:00Z')
     
    Here is my test result
     
    image.png
     
    If you need any further help please let me know.
     
    Thanks
  • logixcrm Profile Picture
    71 on at

    Finally I got it!

     

    Thank you @abm your advice provided part of the solution.

     

    Here is the final solution...

     

    Firstly, map the date field from Dynamics 365 into the compose action

    step 1.JPG

     

    Next, use the convert time zone action to get the date into the correct format, make sure to set the base time as the output from the compose step.

    Step 2.JPG

     

    Finally, you now need to compose an expression to add 1 day. here is the expression i used.

    addDays(body('Convert_time_zone'), 1, 'yyyy-MM-dd')
     
    The only issue here is that you have essentially undone the time formatting, however, this is an easy fix. After entering the expression, click on OK, then next to expression, add a time, in my case i need to time to be 5pm so I added T17:00Z
    Step 3.JPG
     
    That's it, save and test the flow and you should get the following result;
     
    Date value retrieved from Dynamics 365
    Step 4.JPG

     

    The result of the time conversion

    Step 5.JPG

     

    Finally the result of the delay until action, you will see 1 day has been added and the time set to 5pm

    Step 6.JPG

     

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard