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.
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.
>