cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MitchC3
Advocate II
Advocate II

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
Advocate II
Advocate II

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

View solution in original post

1 REPLY 1
MitchC3
Advocate II
Advocate II

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

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,383)