ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help with Format cells to display minutes difference (https://www.excelbanter.com/excel-programming/389382-help-format-cells-display-minutes-difference.html)

Titus

Help with Format cells to display minutes difference
 
D-DAY TODAY
04/01/2008 05/14/2007


322 days 9 hrs 23.0 min 24 sec
0\days [h]\hrs m.0\min ss\sec

in the above worksheet, I calculate the difference betweeen two dates.
I have formatted the cells to display only days, hours,& seconds
successfully. I am having problems with the minutes format, everytime
I take the decimal part out, it revervts to 1 min regardless of the
actual value.


Gary''s Student

Help with Format cells to display minutes difference
 
We are missing something. If you take the difference between the two posted
dates, the result is 323 days, no hours, no minutes, no seconds.
--
Gary''s Student - gsnu200721

JLGWhiz

Help with Format cells to display minutes difference
 
Here are the constants from the VBA help file:

h Display the hour as a number without leading zeros (0 €“ 23).
Hh Display the hour as a number with leading zeros (00 €“ 23).
N Display the minute as a number without leading zeros (0 €“ 59).
Nn Display the minute as a number with leading zeros (00 €“ 59).
S Display the second as a number without leading zeros (0 €“ 59).
Ss Display the second as a number with leading zeros (00 €“ 59).

I don't see the m.0 reference, or am I reading your example wrong?

"Titus" wrote:

D-DAY TODAY
04/01/2008 05/14/2007


322 days 9 hrs 23.0 min 24 sec
0\days [h]\hrs m.0\min ss\sec

in the above worksheet, I calculate the difference betweeen two dates.
I have formatted the cells to display only days, hours,& seconds
successfully. I am having problems with the minutes format, everytime
I take the decimal part out, it revervts to 1 min regardless of the
actual value.




All times are GMT +1. The time now is 05:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com