cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jdrussell78
Level: Powered On

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
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!



jdrussell78
Level: Powered On

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
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!



jdrussell78
Level: Powered On

Re: Greater or less than Current time

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

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!



jdrussell78
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,815)