Calculate date minus 3 months

0
Hi there, I'm trying to create a microflow that triggers when a date is within 3 months from now. But I can't seem to get the expression working. Can someone show me the correct expression please.
asked
3 answers
2

Here is your microflow:

image.png

 

and focused on the xpath of the retrieve:

image.png

 

answered
0

You need addMonths or addMonthsUTC, depending if your date is localized or not. Something like the expression below:

 

addMonths([%CurrentDateTime%], 3) <= [%CurrentDateTime%]

 

The documentation below may help:

https://docs.mendix.com/refguide/add-date-function-calls/#addMonths

answered
0

You are almost there. Try this one:

 

$Personnel/Enddate >= [%BeginOfCurrentDayUTC%] and $Personnel/Enddate <= addMonths([%EndOfCurrentDayUTC%],3)

Regards,

Ronald

answered