web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Update CRM Date field ...
Power Automate
Unanswered

Update CRM Date field with Today's Date

(0) ShareShare
ReportReport
Posted on by 2

I am having an issue when trying to update a date field to the current date in CRM with a Power Automate flow and hoping someone here can help me.  I have searched and can't find a solution.

 

Doing an Update Record

2020-05-27_1446.png

 

Updating Send Survey field to current date with format of 'mm/dd/yyyy'

 

2020-05-27_1450.png

 

This is a snippte of the error but format of date should me 'mm/dd/yyyy'  (Bold text is what I think the issue is of sorts)

 
{
  "status"400,
  "message""--batchresponse_843fa7ff-5a05-4a05-8510-fb2cc4a3ef25\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 400 Bad Request\r\nREQ_ID: f1a6d15d-f8f0-4fb8-ae2c-d775b4f5a8f1\r\nContent-Type: application/json; odata.metadata=minimal\r\nOData-Version: 4.0\r\n\r\n{\"error\":{\"code\":\"0x0\",\"message\":\"An error occurred while validating input parameters: Microsoft.OData.ODataException: Cannot convert the literal '53/27/2020' to the expected type 'Edm.Date'. ---> System.FormatException: String '53/27/2020' was not recognized as a valid Edm.Date.\\r\\n   at Microsoft.OData.PlatformHelper.ConvertStringToDate(String text)\\r\\n   at Microsoft.OData.ODataPayloadValueConverter.ConvertStringValue(String stringValue, Type targetType)\\r\\n   at Microsoft.OData.ODataPayloadValueConverter.ConvertFromPayloadValue(Object value, IEdmTypeReference edmTypeReference)\\r\\n   --- End of inner exception stack trace ---\\r\\n   at Microsoft.OData.ODataPayloadValueConverter.ConvertFromPayloadValue(Object value, IEdmTypeReference edmTypeReference)\\r\\n   at Microsoft.Crm.Extensibility.ODataV4.CrmPrimitivePayloadValueConverter.ConvertFromPayloadValue(Object value, IEdmTypeReference edmTypeReference)\\r\\n   at Microsoft.OData.JsonLight.ODataJsonLightReaderUtils.ConvertValue(Object value, IEdmPrimitiveTypeReference primitiveTypeReference, ODataMessageReaderSettings messageReaderSettings, Boolean validateNullValue, String propertyName, ODataPayloadValueConverter converter)\\r\\n   at Microsoft.OData.JsonLight.ODataJsonLightPropertyAndValueDeserializer.ReadPrimitiveValue(Boolean insideJsonObjectValue, IEdmPrimitiveTypeReference expectedValueTypeReference, Boolean validateNullValue, String propertyName)\\r\\n   at Microsoft.OData.JsonLight.ODataJsonLightPropertyAndValueDeserializer.ReadNonEntityValueImplementation(String payloadTypeName, IEdmTypeReference expectedTypeReference, PropertyAndAnnotationCollector propertyAndAnnotationCollector, CollectionWithoutExpectedTypeValidator collectionValidator, Boolean validateNullValue, Boolean isTopLevelPropertyValue, Boolean insideResourceValue, String propertyName, Nullable`1 isDynamicProperty)\\r\\n   at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.ReadEntryDataProperty(IODataJsonLightReaderResourceState resourceState, IEdmProperty edmProperty, String propertyTypeName)\\r\\n   at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.ReadPropertyWithValue(IODataJsonLightReaderResourceState resourceState, String propertyName, Boolean isDeltaResourceSet)\\r\\n   at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.<>c__DisplayClass9_0.
...
...
...
Categories:
I have the same question (0)
  • MJain Profile Picture
    2,450 on at

    Hi @scottmusich ,

     

    Please use the format as 'MM/dd/yyyy' .

     

    Thanks

  • scottmusich Profile Picture
    2 on at

    That is what I am doing. Here it is copy/pasted so we can see it better.

     
    formatDateTime(utcNow(),'mm/dd/yyyy')
  • RossB Profile Picture
    Microsoft Employee on at

    Hello,

     

    Try this and see what happens:   formatDateTime(utcNow(), 'M/d/yyyy hh:mm:ss')

     

    Thanks!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 608

#2
Valantis Profile Picture

Valantis 416

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard