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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

formatDateTime return error in flow

(0) ShareShare
ReportReport
Posted on by 71

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

I have the same question (0)
  • Suggested answer
    haroldk Profile Picture
    Microsoft Employee on at

    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

  • Suggested answer
    Eduard Brown Profile Picture
    Microsoft Employee on at

    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

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 Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 180 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 123

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans