How to set the date to week later?

0
There is an “order” object, it has “required by” date parameter. When new order created, “required by” date should be set 1 week from the moment of its creation. How can I implement it?
asked
2 answers
3

When you create it from a microflow, you can use addWeeks() 

https://docs.mendix.com/refguide/add-date-function-calls#7-addweeks-utc

Or you could consider having an event handler to do this. 

https://docs.mendix.com/refguide/event-handlers

 

Is that what you are looking for?

answered
1

Hi Maxim,

As Michiel suggested, it is best to implement this using event handlers,

you can update the required by attribute like this 

addWeeks([%CurrentDateTime%],1)

answered