cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MitchC3
Level: Powered On

Format estimated close date for Dynamics 365 Opportunity

I have a flow that creates a new record (in Opportunities) in Dynamics 365 when a new email arrives. I can't figure out how to format the date for the expected close date field. I want the expected close date to be 30 days from when the email is received.

 

I have tried a couple things but most recently set it to: 

formatDateTime(addDays(triggerBody()?['DateTimeReceived'],30),'MM/dd/yyyy')
 
The dates in Dynamics are displayed as MM/dd/yyyy so I'm not sure why this doesn't work.
 
The error message I get is: "Cannot convert the literal '08/25/2018' to the expected type 'Edm.DateTimeOffset'."
1 ACCEPTED SOLUTION

Accepted Solutions
MitchC3
Level: Powered On

Re: Format estimated close date for Dynamics 365 Opportunity

formatDateTime(addDays(triggerBody()?['DateTimeReceived'],30),'yyyy-MM-dd' works

1 REPLY 1
MitchC3
Level: Powered On

Re: Format estimated close date for Dynamics 365 Opportunity

formatDateTime(addDays(triggerBody()?['DateTimeReceived'],30),'yyyy-MM-dd' works

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 56 members 4,333 guests
Please welcome our newest community members: