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

Setting a date field (Edm.Date)

How can I set a date field in a Common Data Service entity from a Flow?

Everything I have tried gives me this error

"An error occurred while validating input parameters: Microsoft.OData.ODataException: Cannot convert the literal '02/28/2019' to the expected type 'Edm.Date'. ---> System.FormatException: String '02/28/2019' was not recognized as a valid Edm.Date.".

In the image you can see that the field in the update body is specified as

"cr89e_pcnstatusdate": "02/28/2019". How can I build a value for the date field which is not interpreted as a string?

Here is the error and the expression in my update statement for the date field.

CDS Date Update Error.jpgCDS Date Update Flow.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Setting a date field (Edm.Date)

Hi @BrianSlalomMS ,

 

Please consider changing the format to "yyyy-MM-dd", as below:

formatDateTime(utcNow(),'yyyy-MM-dd')

In addition, I have tested it on my side. If Behavior is set to User local or Time zone independent, the format "MM/dd/yyyy" is also available:

 

6.PNG

Please take a try and see if issue still exist.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Setting a date field (Edm.Date)

Hi @BrianSlalomMS ,

 

Please consider changing the format to "yyyy-MM-dd", as below:

formatDateTime(utcNow(),'yyyy-MM-dd')

In addition, I have tested it on my side. If Behavior is set to User local or Time zone independent, the format "MM/dd/yyyy" is also available:

 

6.PNG

Please take a try and see if issue still exist.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 92 members 5,159 guests
Please welcome our newest community members: