AddDays/Months/Year within a store calc


#1

Inside a store calc I need to add one day to date received from customr files.
In ExpressionEngine I didn’t find anything like that?
How can I achieve same result of addDays we have in JS?


#2

Here is an example of a field which includes an expression that does datetime math.

orderDeliveryDate: datetime stored calc “orderDate + period(1, ‘DAY’)”


#3

it works - successfully testes


#4

#5

For posterity, note that the expression period(1, 'DAY') + orderDate would not work, as the platform doesn’t support integer + datetime - it has to be ordered per Riley’s post.