Showing results for 
Search instead for 
Did you mean: 
Kudo Kingpin
Kudo Kingpin

@less as condition does not work property

I have a Flow that runs based on a schedule. It detects a case when the last SharePoint list item is older than 30 minutes. I've successfully retreived the last SharePoint list item and outputted Created field value to debug list. Now, I'm trying to determine if this value is older than 30 minutes or not. Seems simple? Well, I've wasted about 2 hours figuring out how to do a proper date comparison condition in Flow and need help with it.


I've got this explression in the conditionn:

less(formatDateTime(string(body('Get_items')?['value'][0].Created), 'yyyy-MM-dd hh:mm'), formatDateTime(addminutes(utcnow(), 30), 'yyyy-MM-dd hh:mm'))
As an example, first parameter that is passed to the less function is equals to 2017-12-14 04:02. second is equal to 2017-12-14 04:33.
Nevertheless, less returns false instead of true.
I've also tried these ways of comparison:
less(string(body('Get_items')?['value'][0].Created), addminutes(utcnow(), 30))
less(body('Get_items')?['value'][0].Created, addminutes(utcnow(), 30)
When examples above are used I either get the same results or an error.
Can someone help me figuring out why less returns false when it has to be true and what am I doing wrong?Less2.png
Super User
Super User

hi @DenisMolodtsov  I'm shure this comparetion todays don't have some problems so maeby the .Created now is not necessary to do the comparation.

Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!

If you want you can follow me at Quieres contenido en español? Síguenos en Power Automate LA

Helpful resources

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,152)