How to Display Excel Time Remaining as Days and Hours Beyond 31 Days
Question details
The user needs to display an expiry countdown or deadline timer in WPS Office Spreadsheet as total remaining days plus hours and minutes when the remaining period is longer than 31 days.

- Product
- WPS Office Spreadsheet
- Device & OS
- not provided
- Scenario
- The user is tracking a future expiry date with a formula such as A1-NOW() and wants the remaining time to remain readable after it exceeds 31 days.
- Observed behavior
- Default Excel date/time formatting can roll over or show an unexpected date once the remaining period exceeds 31 days, so the total day count needs a text-based formula or custom number format.
Confirm that the expiry date cell contains a valid Excel date/time value and that the formula cell is formatted as General or Text before entering the combined day and time formula.
Use INT and TEXT to Display Remaining Days with Hours and Minutes as Text
Use this method when you need the exact remaining day count shown explicitly, even if the countdown exceeds 31 days.
The INT function extracts the whole number of remaining days from the date-time difference, while MOD returns the fractional time portion. The TEXT function then formats that fractional value as hours and minutes.
Click the cell where the remaining time should appear, such as B4.
Type =INT(A4-NOW())&"d "&TEXT(MOD(A4-NOW(),1),"hh:mm") and press Enter.
Confirm that the cell now shows a value like 45d 06:30 instead of rolling over after 31 days.
Use a Custom Number Format to Display Total Remaining Hours Numerically
Use this method when the result must remain numeric and showing total elapsed hours is acceptable.
Track Expiry Countdowns Beyond 31 Days in WPS Office Spreadsheet
WPS Office Spreadsheet supports the same INT, MOD, and TEXT formulas used in Excel, so you can create a clear expiry countdown that displays total days, hours, and minutes without date rollover.
- 1. Open your workbook in WPS Office Spreadsheet: Launch WPS Office Spreadsheet and open the deadline tracking file.
- 2. Select the countdown result cell: Click the cell where you want the remaining time to appear.
- 3. Enter the INT and TEXT formula: Type =INT(A4-NOW())&"d "&TEXT(MOD(A4-NOW(),1),"hh:mm") and press Enter.
- 4. Format or adjust the cell as needed: Keep the cell as General or Text so the text-based day count displays correctly.

Frequently Asked Questions
Why does my Excel time remaining formula show an unexpected date after 31 days?
Excel and WPS spreadsheet date/time formatting can roll over after the time value exceeds 31 days because the underlying value is interpreted as a date serial number. Using INT for the day count and MOD for the time portion avoids the rollover.
Can I keep the countdown result numeric instead of text?
Yes. Apply the custom number format [h]:mm to the formula cell to display total remaining hours as a number. Note that this shows total hours rather than separate days and hours.
How do I display total remaining hours with a custom number format?
Select the formula cell, press Ctrl+1 to open Format Cells, choose Custom on the Number tab, enter [h]:mm, and click OK. WPS Office Spreadsheet uses the same custom format entry as Excel.
Does the INT and TEXT countdown formula update automatically?
Yes. Because it uses NOW(), the formula recalculates when the workbook calculates or when you press F9, just like other volatile date/time formulas in Excel.
Will this expiry countdown formula work in WPS Office Spreadsheet?
Yes. WPS Office Spreadsheet supports the same INT, MOD, TEXT, and NOW functions used in Excel, so the formula works without conversion.




