Hey All,
I am having issues trying to greater then or lower than... I tried to use the formatDateTime but still no dice:
Here is what I am getting on the failed run:
Unable to process template language expressions for action 'Condition_2' at line '1' and column '2320': 'In function 'formatDateTime', the value provided for date time string '05' was not valid. The datetime string must match ISO 8601 format.'.
Any ideas?
-n
Solved! Go to Solution.
@k1ng As you are comparing just the hour in the condition, you just need to provide 05 or 5 value in the right side of condition as shown in below screenshot
@k1ng sorry my bad, you need to convert hour value to integer, so please use below expression on left side of both conditions, you need to provide expression from Dynamic Content -> expression
int(body('Convert_time_zone'))
@k1ng As you are comparing just the hour in the condition, you just need to provide 05 or 5 value in the right side of condition as shown in below screenshot
@annajhaveri, works for 05 not for 17 however? Get this now:
Unable to process template language expressions for action 'Condition_2' at line '1' and column '2320': 'The template language function 'greaterOrEquals' expects two parameter of matching types. The function was invoked with values of type 'String' and 'Integer' that do not match.'. ?
(tried just 17 and the same result)
@k1ng sorry my bad, you need to convert hour value to integer, so please use below expression on left side of both conditions, you need to provide expression from Dynamic Content -> expression
int(body('Convert_time_zone'))
Thank you Anna!
@annajhaveri Shoot I lied lol.
Unable to process template language expressions for action 'Condition_2' at line '1' and column '2320': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.
Basically, I just want to know if the current time is after hours (7am-5pm)... I need to change that from 05 to 07 lol
@k1ng it should have worked, what is the output value of convert time action when you got this error?
Apparently flow doesn't like 'HH' only. Got this:
Unable to process template language expressions for action 'Condition_2' at line '1' and column '2320': 'In function 'formatDateTime', the value provided for date time string '17' was not valid. The datetime string must match ISO 8601 format.'.
However when I did this:
formatDateTime(body('Current_time'),'HH:mm') >= formatDateTime('17:00','HH:mm') formatDateTime(body('Current_time'),'HH:mm') <= formatDateTime('07:00','HH:mm')
It worked 😉 Thank you again Anna 🙂
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
8 | |
2 | |
2 | |
1 | |
1 |