Number of Weeks Between Two Dates (WEEKS)

Syntax: WEEKS(t1; t2; Week_Type)

The WEEKS function calculates the number of weeks between two dates, either in weekly intervals (0) or in calendar weeks (1). For example:

=WEEKS(DATE(2010; 1; 15); DATE(2010; 2; 1); 0)

returns 2, because the difference between these two dates is less than the length of three full weeks (21 days), and

=WEEKS(DATE(2010; 1; 15); DATE(2010; 2; 1); 1)

returns 3, because in calendar terms in February we think of January 15 as being three weeks ago.

images

Figure 12-16. Sample result of the WEEKS function

You can give WEEKS the date in a more natural format:

=WEEKS("1/15/2010"; ...

Get Beginning OpenOffice Calc: From Setting Up Simple Spreadsheets to Business Forecasting now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.