Showing results for 
Search instead for 
Did you mean: 
Not applicable

Flow ISO 8601 format Error Message

I've got a Recurring flow that updates the 'ComplianceStatus' of each item in the list. I am getting the following error message on the 'Yes' side of the 'Condition'.


InvalidTemplate. Unable to process template language expressions in action 'Set_variable_-_varDaystoRenewal' inputs at line '1' and column '12907': 'In function 'ticks', the value provided for date time string 'Self-Contained Breathing Apparatus Fit Test' was not valid. The datetime string must match ISO 8601 format.'.


Set variable - varDaystoRenewal:

DIV(sub(ticks(utcNow()), ticks(items('Apply_to_each')?['CQTitle'])), 864000000000)
Set variable - ComplianceStatus:
if(and(less(variables('varDaystoRenewal'),1095), equals(variables('varCQTitle'),'Medical')) , 'Compliant'
'varDaystoRenewal'),720), equals(variables('varCQTitle'),'Live Fire Refresher')) , 'Compliant'
'varDaystoRenewal'),365), equals(variables('varCQTitle'),'Self-Contained Breathing Apparatus Fit Test')) , 'Compliant'
if(and(less(variables('varDaystoRenewal'),365), equals(variables('varCQTitle'),'Fitness Test')), 'Compliant','Noncompliant'))))
Super User
Super User

Hello @Anonymous 


What is the value of CQTitle? The error message is indicating that this value is not a date/time.

Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up

Proud to be a Flownaut!

Check out my blog for Power Automate tips,
tricks, and guides

Not applicable

Yes, you are correct. I've made the update to the expression.


I am still have the original issue, all entries in the 'ComplainceStatus' column are returning "Certified". 


If the 'DteofCQ' is not blank - and the 'CQTitle' is a Certification (per the Condition string), the 'ComplianceStatus' should default to 'Certified'; - if the 'CQTitle' is a Qualification (per the Condition string), the varDaystoRenewal and varComplianceStatus should apply:



DIV(sub(ticks(utcNow()), ticks(items('Apply_to_each')?['DteofCQ'])), 864000000000)
if(and(less(variables('varDaystoRenewal'),1095), equals(variables('varCQTitle'),'Medical')) , 'Compliant', if(and(less(variables('varDaystoRenewal'),720), equals(variables('varCQTitle'),'Live Fire Refresher')) , 'Compliant', if(and(less(variables('varDaystoRenewal'),365), equals(variables('varCQTitle'),'Self-Contained Breathing Apparatus Fit Test')) , 'Compliant', if(and(less(variables('varDaystoRenewal'),365), equals(variables('varCQTitle'),'Fitness Test')), 'Compliant','Noncompliant'))))


Any thoughts one why all I get is 'Certified' in the column?




The 'Compliance' column is the one associated with the flow. The 'ComplianceStatus' column is a calculated column within the SP list that I'd like to replace with the flow. As can be seen, the flow results are not correct.













Helpful resources

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,937)