web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 69

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

  • Suggested answer
    Eduard Brown Profile Picture
    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 125

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 121 Super User 2025 Season 2

#3
Erin Lubben Profile Picture

Erin Lubben 73

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans