DAYS in WPS Spreadsheet: Subtract Dates in the Correct Order and Preserve Fractions
Use WPS DAYS with end date first, distinguish elapsed from inclusive days, and understand numeric date-time fractions versus text-date parsing.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: DAYS(end_date, start_date) returns the difference between two dates with the end date first. The WPS definition explicitly uses end minus start for numeric arguments, so numeric date-time fractions can remain in the result.
Availability and version history
- Introduced: documented by 2019-06-18 in the official WPS lesson; original introduction is not established.
- Availability: WPS Office for Windows Personal; the lesson metadata gives no numeric release.
- Scope: exact current supported builds remain unverified; the historical Windows lesson does not establish all WPS clients.
- Checked: October 14, 2026 against complete function-specific documentation. Examples are independent expectations; no native WPS test was performed.
Syntax and argument order
=DAYS(end_date, start_date)
Both arguments are required. Numeric arguments follow subtraction. The source says text arguments are processed as DATEVALUE date text, producing an integer date and discarding the time component. That input-type distinction matters when comparing timestamps.
Keep the result as a number of days rather than date-formatting it. Examples use English names and comma separators, with independent expected results. They are not native WPS captures.
Example 1: reproduce a complete school interval
=DAYS(DATE(2021,7,28),DATE(2021,2,24))
Expected result: 154 days. These are the start and end dates named by the WPS walkthrough, constructed explicitly with DATE rather than depending on text parsing.
Reversing the numeric date arguments gives −154, and using the same date twice gives 0, under the directly documented end-minus-start rule. The argument order differs from several other date functions, so inspect it before trusting a plausible number.
Example 2: elapsed versus inclusive counting
=DAYS(DATE(2026,10,14),DATE(2026,10,11))
=DAYS(DATE(2026,10,14),DATE(2026,10,11))+1
Expected results are 3 elapsed days and 4 inclusive date labels: 11, 12, 13 and 14 October. The +1 belongs to the chosen forward date-only counting policy. It is not a universal adjustment for negative intervals or fractional timestamps.
A leap-year control is =DAYS(DATE(2024,3,1),DATE(2024,2,28)), which gives 2. For the corresponding 2026 dates it gives 1.
Advanced example: retain numeric timestamp fractions
Create A2 with =DATE(2026,10,14)+TIME(6,0,0) and B2 with =DATE(2026,10,15)+TIME(18,0,0):
=DAYS(B2,A2)
=DAYS(B2,A2)*24
Expected results are 1.5 days and 36 hours. Reversing the numeric arguments gives −1.5 days. These follow subtraction of complete numeric values; DAYS is not inherently an integer-only duration function.
If recognized text timestamps are used instead, the source’s DATEVALUE route discards times. This guide does not certify a universal combined-string grammar, but the documented input-type difference explains why apparently similar values can give different answers.
Advanced example: calculate adjacent gaps in a dated log
Enter date-only values 1 Oct, 3 Oct, 10 Oct and 14 Oct 2026 in D2:D5 using DATE. In E3 enter and fill down:
=DAYS(D3,D2)
Expected gaps are 2, 7 and 4 days, totaling 13, equal to the difference between 1 and 14 October. A negative gap in an intended chronological log signals ordering or source-data issues; it is not automatically a parsing failure.
Do not use a day-of-month component subtraction here. For example, 31 January to 2 February crosses a month boundary even though the later DAY component is smaller.
Errors, source wording and related guides
The WPS lesson names #NUM! for numeric values outside its valid date range and #VALUE! for text that cannot be parsed as a valid date. The translated source wording around invalid strings is awkward, but the walkthrough clearly describes an invalid February 30 text date. That differs from DATE’s documented positive overflow: DATE(2023,2,30) normalizes instead of acting as strict text validation.
The source’s serial-origin wording differs from several older WPS lessons. This guide certifies the explicit arithmetic and modern inputs, not every absolute-base boundary, blank coercion or imported workbook system.
Use DATEVALUE to inspect date-text conversion, DATE for numeric components and DAYS360 only when a deliberate 30/360 convention is required.
References and verification
- WPS Academy: DAYS, 2019-06-18 (Chinese; Windows Personal).
- WPS Academy: TIME.
- WPS Academy: DATE.
- Editorial testing standards.
The complete function definition and walkthrough were reviewed. Worked outputs are independent calendar and time models; source ambiguities and native boundaries remain explicit.