IF [before certain date]

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!
2 answers

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. 


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.