How can I add days to a date field?

How can I add days to a date field?

You can manipulate a date field by using the + (to add) and - (to subtract) Operators or by using the Built-in date functions. For example, if you would like to add 364 days to a particular date field, say StartDate and display it in another field, define a formula field named ExpiryDate with expression (StartDate + "52W:0D:0H:0M:0S") or by using the addDay built-in date function, StartDate.addDay(364).

For example,

form  Sample
{

StartDate
(
type = date
)


ExpiryDate
(
type = formula
value =
(StartDate + "52W:0D:0H:0M:0S")
)
}

where,

- W stands for the number of weeks.
-
D stands for the number of days.
- The other units of time supported are
H (hours), M (minutes) and S (seconds)