Filter dates according to a particular criteria?

0
What xpath constraint or microflow do we use to filter dates according to a particular criteria? Like for example say – we want to select  only 15 last days of the data(it is imported from excel into mendix and stored in database).
asked
4 answers
0

In a microflow, you would create a variable that represents 15 days before today (set the value to addDays([%CurrentDateTime%],-15).  Then use that variable in your Xpath on the retrieve.

Doing this purely with Xpath is difficult.  You would need some way to get the date 15 days before today – you could use a Calculated attribute on a helper entity, but that is not the neatest solution IMO.

answered
0

 

 

 

 

But it does not still work?

answered
0

Mike meant it the other way around (I think, am no mindreader). Like so:

With FifteenDaysAgo being 

addDays([%CurrentDateTime%], -15)

 

answered
0

Besides the microflow solutions, there is a way to do some basic date math directly in an XPath constraint. See this post for details:

https://forum.mendix.com/link/questions/5

 

answered