Forum Discussion

ChemEnger's avatar
ChemEnger
Copper Contributor
Jun 09, 2022
Solved

Display number of days in Custom Format

I have a calculation of the difference between two dates and I'd like to display the answer as d "days" h "hours".  Excel interprets the d as the day of the month of the number of days since 1900, so...
  • HansVogelaar's avatar
    Jun 09, 2022

    ChemEnger 

    There is no custom format for cumulative days. I'd use one column for the numeric difference, e.g. 179.5, and another with a formula for the display value. For example with the numbers in D2 and down, enter the following formula in E2 and fill down:

    =INT(D2)&" day(s) "&TEXT(D2,"h")&" hour(s)"

Resources