Why is there no subtractMinutes, subtractMonths, etc. function?
Recently the addMinutes, addMonths, etc. functions were added. Why is there no subtractMinutes, subtractMonths, etc. functions? Is there an alternative way to calculate what the time was 60 minutes ago? I'm trying to set the datetime attribute of an entity to the time it was 60 minutes ago.
You can use a negative number to subtract minutes etc. from a DateTime value.
Example: addMinutes($dateTimeValue, -60)
Benny van Reeven
Try using the functions with negative numbers, like: