IF [before certain date]

0
Hi all, I’m new to Mendix and looking for a way to use a given date as a condition for a decision. If the date given is before a certain time, I want to display a message warning the user. If the date given is more recent than the date specified in the condition, do nothing. How would I configure a condition like this? Many thanks!
asked
2 answers
1

You'd have to create a variable (datetime) with an operation that determines what your cut-off date is. So as an example, a check if date is older than 9 days:

[create variable (datetime)] »  set variable to addDays( [%CurrentDateTime%] , -9)  » $NineDaysAgo

[exculsive split] » compare $object/datetime <= $NineDaysAgo

 

Mendix has other pre-configured datetime variables such as BeginOfCurrentDay, week, month, year, as well as EndOfCurrentDay, week, etc. 

answered
0

You can just use the math functions for that. So >= is greater or equal. So you can use an exclusive split like this:

$dateToCheck >= $someOtherDate

You can also use tokens like [%CurrentDateTime%] in those expressions.

Regards,

Ronald

 

answered