Format Dates and Calculate Days Between Dates in WPS Spreadsheets
Question details
Format date entries consistently and calculate the number of days between two valid dates with the DAYS function.

- Product
- WPS Spreadsheets
- Device & OS
- not provided
- Scenario
- The user needs to enter dates correctly and find the elapsed days between a start date and an end date.
- Observed behavior
- Dates may display inconsistently or be stored as text, causing the DAYS formula to return an error or an unexpected result.
Check that both date cells contain actual spreadsheet dates rather than text strings. Confirm the intended day-month-year order before converting imported or manually entered dates.
Enter valid dates and use the DAYS function in the correct order
Use this method when you are entering dates manually or creating dates in formulas and need an accurate day difference.
The DAYS function uses the end date as its first argument and the start date as its second argument. Use the DATE function to create unambiguous date values when needed.
In WPS Spreadsheets, enter the start date in A2 and the end date in A3 using a consistent date format, such as 1/1/2012 and 3/31/2012.
Select a cell and enter a formula such as =DATE(2012,1,1) for January 1, 2012, or =DATE(2012,3,31) for March 31, 2012.
Select the result cell, type =DAYS(A3,A2), and press Enter. A3 is the end date and A2 is the start date.
Select the date cells, open Home > Number Format, and choose Date so the values display consistently.

Convert text dates to real date values before calculating
Use this method when a date is left-aligned, does not change format, or causes DAYS to return an error.
Calculate Date Differences Easily with WPS Spreadsheets
WPS Spreadsheets lets you format date cells, convert imported date text, and use formulas such as DAYS and DATE to calculate elapsed time accurately in a familiar spreadsheet workspace.
- 1. Open your worksheet: Launch WPS Spreadsheets and open the workbook containing the date values.
- 2. Format the date cells: Select the date column and choose Home > Number Format > Date.
- 3. Convert text dates if necessary: Use Data > Text to Columns and select the correct date order to turn text into usable dates.
- 4. Enter the date-difference formula: Select an empty result cell, enter =DAYS(A3,A2), and press Enter.

Frequently Asked Questions
Why does the DAYS formula return an error in WPS Spreadsheets?
An error usually means one or both referenced cells contain text instead of real date values. Convert the cells through Data > Text to Columns, then use =DAYS(end_date,start_date).
Which date goes first in the DAYS formula?
Enter the end date first and the start date second. For example, if A2 is the start date and A3 is the end date, use =DAYS(A3,A2).
How can I create a date that will not be misread by the spreadsheet?
Use the DATE function with year, month, and day arguments, such as =DATE(2012,3,31). This creates a true date value regardless of how dates are displayed.
Why do my dates remain unchanged when I choose a different date format?
The entries are likely stored as text. Select them and use Data > Text to Columns, choose the matching Date order, and click Finish before applying a format from Home > Number Format.
Can WPS Spreadsheets open Excel files containing date formulas?
Yes. WPS Spreadsheets supports Microsoft Excel XLS and XLSX files and can work with common date formulas, including DAYS and DATE.




