A formula that counts the days between two dates is only right if both cells hold real dates and not text that looks like a date. Testing it on pairs with known counts, including a pair across a month boundary, proves the formula before it is used on real deadlines.
Prerequisites
- Google Sheets
- The AI-written date formula and two date columns
- A copy of the source file, so the original stays untouched.
Steps
- Ask the AI for the formula, naming the start-date and end-date columns.
- Test it on a pair whose answer you know, such as 2 November to 9 November giving 7.
- Test it on a pair across a month boundary, such as 28 November to 2 December giving 4.
- Check that both date columns are formatted as dates, not text, by confirming the values right-align and sort correctly.
- Copy the checked formula down and spot-check three rows against a calendar.
Worked example: Fictional library loan periods
The practice table below is a fictional five-loan list. The days column is the days from the borrow date to the due date, and the total is their sum. The table below is fictional practice material, with fictional values. It is the expected result, worked out by hand, not a run of any tool.
| Book | Borrowed | Due | Days |
|---|---|---|---|
| Novel A | 2026-11-02 | 2026-11-16 | 14 |
| Novel B | 2026-11-03 | 2026-11-10 | 7 |
| Cookbook | 2026-11-05 | 2026-11-26 | 21 |
| Poetry | 2026-11-09 | 2026-11-23 | 14 |
| History | 2026-11-12 | 2026-11-19 | 7 |
| Total | 63 |
Expected result. Five loans, each day count matches the calendar, and the days add to 63. UNTESTED: no AI formula was generated for this guide; the table shows the expected values a check should produce.
Limits
- A date stored as text will not subtract, so check the cell format before trusting the result.
- Whether the count includes the end date depends on the formula, so state the rule on the sheet.
