cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

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

Re: Greater or less than Current time

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 blog
Highlighted
Helper V
Helper V

Re: Greater or less than Current time

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

Re: Greater or less than Current time

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 blog
Highlighted
Helper V
Helper V

Re: Greater or less than Current time

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

Highlighted
Super User
Super User

Re: Greater or less than Current time

Hi @jdrussell78 

 

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 blog
Highlighted
Helper V
Helper V

Re: Greater or less than Current time

 

Hey,

 

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

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (8,471)