Provides two custom functions for easily adding and subtracting time from a date value.
Examples: Adds 3 months to the date in cell A1. =DATEADD(A1, "months", 3) Subtracts 12 weeks from the date in cell A1. =DATESUBTRACT(A1, "w", 12) Adds 2 days to the dates in the range A1:A10. =DATEADD(A1:A10, "day", 2) This add-on was created as a sample for other developers to learn from. The complete Apps Script source code is available here: https://github.com/google/google-apps-script-samples/tree/master/date_add_and_subtract
Original Content at: LINK
#googlesheets #expressions #datemath