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 III
Super User III

@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

@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

@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

@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

@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (12,926)