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

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

Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (83,841)