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

Greater or less than Current time

Hi,

 

How are you all?

 

I have a flow where I capture the current date time this is shown as:

 

"body": "2019-10-28T08:13:37.2080299Z"
 
I want to say as part of condition:
 
CurrentDateTime is >= 07:30:00 and CurrentDateTime is <= 09:00:00
 
Any ideas how I achieve this ?
 
Thanks in advance
6 REPLIES 6
abm
Super User
Super User

Try the following

 

formatDateTime(utcNow(),'HHmmss'). This will give you an output without semi-colons.
 
Then compare this with  073000 & 090000
 


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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
Anonymous
Not applicable

Hey thanks for this, however the condition fails at the bottom of this screenshot.

 

"Unable to process template language expressions for action 'Condition_2' at line '1' and column '2770': 'The template language function 'less' expects two parameter of matching types. The function was invoked with values of type 'String' and 'Integer' that do not match.'."

 

The expression used is

 

formatDateTime(variables('Time'),'HHmmss')
 
flow.JPG

Could you use compose step instead of variable and try?



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
Anonymous
Not applicable

So I have tried that, and still getting the same issueflow 2.JPG

Hi @Anonymous 

 

Could you please post your flow screenshot?

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
Anonymous
Not applicable

 

Hey,

 

I managed to sort this myself in the end, but thanks for your help ! flow.JPG

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (3,007)