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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,627)