Subtract one day from date

With a booking system one has to give arrival date and departure date. The departure date is set in the database and will be blocked in the datepicker.
The problem comes with departure date as this is also a possible arrival date for new guests. So I would like to substract 1 day from the departure day before it is entered in the database. The client will see this as “Last day”
I tried several things, but (what’s new) no joy.
Can anyone give me directions pse?

Have you tried date time formatters? There is a formatter available to add day. Just use that and put number of days to add as -1.

1 Like

Hmm, why didn’t I think of that. Thanks a million

1 Like