Calcule Uptime in days and minutes excel

Support_38
Support_38 used Ask the Experts™
on
Good Morning

I would like to calculate the uptime of a server.

I have a column with the last date and time the server was restarted.

I have another column of "uptime days minutes" and I want this column to show the time in days and minutes that the server is active.

I tried the formula below but it did not work

= B2-now ()

       A                                                B                                                                          C
Server Name                             Last_Restart                                                   Uptime days minutes
Server02                  2017-02-25 15:00:04.253                                        = B2-now ()
Server03                  2017-01-08 05:47:40.570      
Server04                  2017-02-14 05:40:58.500      
Server01                  2017-01-10 05:49:52.830      
Server05                  2017-01-08 09:02:33.167      
Server06                  2017-03-29 09:05:56.940      
Server07                  2017-02-25 15:14:06.887      
Server08                  2017-01-13 00:35:18.460      
Server09                  2017-01-15 07:20:50.007      
Server10                  2017-03-02 04:39:08.227      
Server11                  2017-01-31 03:25:42.250      
Server12                  2017-02-20 10:00:52.463      

Can anybody help me
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016

Commented:
Hi,

Change the format to [mm]
or
=TEXT(NOW()-B2,"[mm]")

Open in new window

Regards
Top Expert 2016

Commented:
HI,

pls try
=INT(NOW()-B2)&" day(s) "&TEXT((NOW()-B2)-INT(NOW()-B2);"[mm]")&" Minute(s)"

Open in new window

Regards
ShumsManaging Director/Excel VBA Developer
Distinguished Expert 2018

Commented:
Try below:
=IF(TEXT(TODAY(),"d")-TEXT($B1,"d")>1,DAY(TODAY()-$B1)&" Days "&HOUR(NOW()-$B1)&" Hours "& MINUTE(NOW()-$B1)&" Minutes ",HOUR(NOW()-$B1)&" Hours "& MINUTE(NOW()-$B1)&" Minutes ")

Open in new window

Server-Timings.JPG
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Hello,

For me it is giving error, I think I am doing something wrong.

You can put it in the worksheet that is attached.

Thank you.
Plan1.xlsx
ShumsManaging Director/Excel VBA Developer
Distinguished Expert 2018

Commented:
Please find attached...
Alex_Plan1.xlsx
Finance Analyst
Commented:
RGonzo that only gives minutes, not days and minutes. I presume user wants days, hours and minutes rather than just days and minutes.
Server-time.xlsx
ShumsManaging Director/Excel VBA Developer
Distinguished Expert 2018

Commented:
Corrected formula:
=IF(TEXT(TODAY(),"d")-TEXT($B2,"d")>1,DAY(TODAY()-DAY($B2))&" Days "&HOUR(NOW()-HOUR($B2))&" Hours "& MINUTE(NOW()-MINUTE($B2))&" Minutes ",HOUR(NOW()-HOUR($B2))&" Hours "& MINUTE(NOW()-MINUTE($B2))&" Minutes ")

Open in new window

Alex_Plan1.xlsx
Rob HensonFinance Analyst

Commented:
Try this:

=INT(TEXT(NOW()-B2,"[m]")/1440)&" Days "&TEXT(TIME(INT(MOD(TEXT(NOW()-B2,"[m]"),1440)/60),TEXT(NOW()-B2,"[m]")-(INT(TEXT(NOW()-B2,"[m]")/1440)*1440)-(INT(MOD(TEXT(NOW()-B2,"[m]"),1440)/60)*60),0),"hh:mm")

Format can be General as the result is a text string.

Using RGonzo's formula to get total number of minutes then converts that value into Days Hours and Minutes.

See Attached.

Thanks
Rob H
Server-time.xlsx
Rob HensonFinance Analyst

Commented:
Alex, thanks for accepting my comment but unfortunately the file that is attached to that comment had the wrong formula; the day element was incorrect.

Author

Commented:
It is true,

I did not notice the detail of the day

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial