Complete the formula to calculate the number of days between two dates in Google Sheets.
=DATEDIF(A1, [1], "D")
The DATEDIF function calculates the difference between two dates. Here, A1 is the start date and B1 is the end date. The "D" tells it to return the difference in days.
Complete the formula to add 30 days to a date in cell A1.
=A1 [1] 30
Adding 30 to a date adds 30 days. The plus sign + is used to add days to a date in Google Sheets.
Fix the error in the formula to calculate the number of months between two dates in A1 and B1.
=DATEDIF(A1, B1, [1])To calculate the number of full months between two dates, use "M" as the unit in DATEDIF. Other units calculate years, days, or days ignoring months and years.
Fill both blanks to create a formula that returns TRUE if the date in A1 is before today.
=A1 [1] [2]()
The formula checks if the date in A1 is less than (<) today's date. TODAY() returns the current date without time.
Fill all three blanks to create a formula that calculates the number of weekdays between two dates in A1 and B1.
=NETWORKDAYS([1], [2], [3])
NETWORKDAYS counts weekdays between two dates. The first two arguments are the start and end dates (A1 and B1). The third argument is an optional range of holidays (C1) to exclude.