Help‎ > ‎Add Keyword Help Record‎ > ‎

Google Sheets Date Math

posted Sep 27, 2016, 6:32 AM by Saul Castellanos

Add-on

Date Add and Subtract


(63)
28,234 users
FREE




OVERVIEW

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
TAGS:
#googlesheets #expressions #datemath

Comments