cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Invalid DateTime error message

Hello,

 

I am working on a flow that reads assigned due dates in a SharePoint list and sends a reminder email provided that the date is within 30 days of the current date and a second columns toggle option is set to 'No'

 

The current error I keep on seeing when testing the flow is:

 

"error": {
"code": 502,
"source": "flow-apim-msmanaged-na-northcentralus-01.azure-apim.net",
"clientRequestId": "c4bd1210-9c24-4734-b6ab-088ab616e191",
"message": "BadGateway",
"innerError": {
"status": 500,
"message": "The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.\r\nclientRequestId: c4bd1210-9c24-4734-b6ab-088ab616e191\r\nserviceRequestId: b649d29e-f035-8000-8cf9-7d9e281e2e41"
}
 
I have attached a screenshot of the relevant part of the flow. My columns in the SP list are as follows:
 
EmployeeName
EmployeeEmail
ManagerName
ManagerEmail
DueDate (formatted as mm/dd/yyyy)
SurveyRecieved (formatted as Yes/No toggle)
 
Is this an issue with the date formating in SP or a different issue entirely?
 
Thank you!Flow4_12_19.PNG
5 REPLIES 5
Super User
Super User

Re: Invalid DateTime error message

@Anonymous :

Try changing the expression in your compose action to be as follows:

addDays(utcNow(),30,'yyyy-MM-dd')

 

Also, what type of column is SurveyReceived?  If Survey Received is a Yes/No column, the last part of your filter should read:

SurveyReceived eq 0

There are no single quotes around 0.

 

 

 

Please let me know if that works for you.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Anonymous
Not applicable

Re: Invalid DateTime error message

@ScottShearer ,

 

I changed the expression however I am recieving a new error:

 

The expression "DueDate eq '4/12/2019' SurveyRecieved eq 'No'" is not valid.

 

The SurveyRecieved column is a Yes/No switch column, with the default currently set to "No"

 

Thanks

Super User
Super User

Re: Invalid DateTime error message

@Anonymous :

I was in the process of udpating my original post to address the second issue.

If SurveyReceived is a yes/no column, the last part of the filter shoud read:

SurveyReceived eq 0

the 0 has no single quotes around it.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Anonymous
Not applicable

Re: Invalid DateTime error message

@ScottShearer 

 

The issue is still persisting, I am still getting a simlar message

 

"The expression \"DueDate eq 'addDays(utcNow(),30,'yyyy-MM-dd')' and SurveyRecieved eq 0\"
 
When I input a static date, say 04/12/2019, the flow will run without issues but when I include the output of my formula I receive the previous error. 
 
FlowWithUpdatedFormula.PNG
Highlighted
Super User
Super User

Re: Invalid DateTime error message

@Anonymous :

 

I believe that your issue is that you are not entering the compose expression in the expression edit window.  You can't enter it simply as text.  Be sure to click on "Update" when you are finished - otherwise your changes will not be saved.  See my screen shot below:

ComposeExp.jpg

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,255)