Additional Details
By default this filter assumes the amount you pass in is in days. You can also pass in other intervals as a second parameter like:
{{ 'Now' | DateAdd:-12,'h' }}
This would subtract 12 hours from the current date/time.
Valid units are:
- y - Years v8.0
- M - Months v8.0
- w - Weeks v8.0
- d - Days
- h - Hours
- m - Minutes
- s - Seconds
Adding weeks is simply a shorthand for adding by 7 days at a time.
Example:
Your first visit was {{ CurrentPerson | Attribute:'FirstVisit' }}. Two weeks later would be {{ CurrentPerson | Attribute:'FirstVisit' | DateAdd:14 }}.
Your first visit was 2/14/2011. Two weeks later would be 2/28/2011.
Note:
When adding months and years, if you are going from one month with more days than the target month, the day number will be reduced to fit within the new target month.
- 5/31/2018 + 1 month = 6/30/2018
- 2/29/2016 + 1 year = 2/28/2017