Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

formatDateTime return error in flow

(0) ShareShare
ReportReport
Posted on by 34

Hi

I created a List Records action to get last modified record.

then add Filter query to Get Rows action to retrieve data greater than the last modified date

i added condition like in "image1" checking modified date gt lastSyncDate (i tried with and without adding single code around lastSyncDate )

for both i am getting this error: 

Http request failed: the content was not a valid JSON.

Then I tried to set a variable to get the lastsyndate then add condition in Get Rows action as shows in image 2:

expression used: 

formatDateTime(variables('last_sync_Date'),'yyyy-MM-dd')

i am getting the error: 

Unable to process template language expressions in action 'Get_rows' inputs at line '1' and column '17323': 'In function 'formatDateTime', the value provided for date time string '2020-08-07T18:28:38Z -' was not valid. The datetime string must match ISO 8601 format.'.

Please advice me how i can include filter query with

modified_date gt lastsyncdate 

Thank you

image 1

SysncDate.GIF

image 2

SyncFormat.GIF

  • Suggested answer
    Eduard Brown Profile Picture
    Eduard Brown on at
    RE: formatDateTime return error in flow

    Hi Siva - I don't believe this is an issue that is specific to Marketing.

    Please look to this documentation regarding formatDateTime and also double check what is pushing your input is valid.
    If this isn't sufficient I invite you to post within the Power Automate forum for further support

    Thanks,
    Eddy

  • Suggested answer
    haroldk Profile Picture
    haroldk on at
    RE: formatDateTime return error in flow

    this looks to be the same as the other post. Try surrounding the formatdatetime with single quotes.

    In the future you might get a quicker response using the Power Automate Community forum

    powerusers.microsoft.com/.../FL_Comm_Forums

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans