Ask three people how many business days sit between Monday, October 5 and Friday, October 16 and you will get two different answers: 9 business days (elapsed delivery window excluding the start day) or 10 business days (inclusive payroll workdays). That single off-by-one ambiguity causes missed shipping SLAs, late contract filings, and broken spreadsheet formulas.
Counting Business Days vs. Calendar Days (Handling Weekends and Holidays)
Before calculating working days between two dates, verify whether your use case counts inclusive workdays or net elapsed business days:
- Payroll and project capacity (inclusive): Counts both the start date and end date if they fall on Monday through Friday. Monday to Friday of the same week =
5 working days. - Shipping, banking, and legal SLAs (T+N elapsed): Day 0 is the trigger date (provided the order arrives before the cutoff hour), and Day 1 is the next business day. An order placed on Monday with a "3-business-day SLA" is due by end of day Thursday.
Excel & Google Sheets Working Days Formula: =NETWORKDAYS(start_date, end_date, [holidays_range]). For custom weekend schedules (such as Friday-Saturday weekends or 6-day Mon-Sat operations), use =NETWORKDAYS.INTL(start_date, end_date, weekend_code, [holidays_range]).
Check your exact working-day count across weekends now:
When you need the exact calendar span broken down into years, months, total days, and hours (such as age verification, visa day-count limits, or subscription proration), use the calendar Date Difference Calculator:
Unix Timestamp to Date Formula in Excel, JavaScript, and PostgreSQL
A Unix timestamp (POSIX epoch time) counts the number of non-leap seconds elapsed since 1970-01-01T00:00:00Z (UTC). Because spreadsheet serial dates count days since 1899-12-30 (where 1970-01-01 equals serial day 25569), converting a Unix timestamp in Excel or Google Sheets requires dividing by 86,400 seconds per day and adding DATE(1970,1,1).
Excel Unix Timestamp Formula (10-digit seconds in cell A2): =(A2 / 86400) + DATE(1970, 1, 1). For 13-digit milliseconds (JavaScript Date.now() exports): =(A2 / 86400000) + DATE(1970, 1, 1).
| Environment | Seconds (1792281600) to UTC Date | Date to Unix Seconds |
|---|---|---|
| Excel / Sheets | =(A2 / 86400) + DATE(1970,1,1) | =(A2 - DATE(1970,1,1)) * 86400 |
| JavaScript / Node.js | new Date(sec * 1000).toISOString() | Math.floor(Date.now() / 1000) |
| PostgreSQL | to_timestamp(1792281600) AT TIME ZONE 'UTC' | EXTRACT(EPOCH FROM NOW())::bigint |
| Python 3 | datetime.fromtimestamp(sec, tz=timezone.utc) | int(dt.timestamp()) |
| Linux Bash (GNU) | date -u -d @1792281600 +"%Y-%m-%d %H:%M:%S" | date +%s |
My debugging rule: whenever a converted timestamp lands in the year 58,796 or 1970-01-21, you mixed up seconds (10 digits) and milliseconds (13 digits). JavaScript's Date constructor expects milliseconds, while Python, PHP, PostgreSQL, and Unix cron/JWT exp claims use seconds.
Understanding ISO-8601 Week Numbers (W01 to W53)
Supply-chain schedules, European engineering sprints, and financial reporting frequently reference dates by ISO week (such as 2026-W42). Under ISO-8601:
- Every week begins on Monday (Day 1) and ends on Sunday (Day 7).
- Week 01 of any year is defined as the week that contains the first Thursday of January (equivalently, the week containing January 4th).
Because of that rule, December 29, 30, or 31 can belong to W01 of the *following* ISO year, and January 1, 2, or 3 can belong to W52 or W53 of the *previous* ISO year. In Excel, never use bare =WEEKNUM(A2) if your team follows ISO weeks; always use =ISOWEEKNUM(A2).