Formula to convert Milliseconds to Days, Hours, Minutes and Seconds

Formula to convert Milliseconds to Days, Hours, Minutes and Seconds

When any time value is represented in milliseconds, it can be converted to human readable format as below.

1000000000 milliseconds can be converted to 11Days 13Hours 46Minutes 40Seconds. The column 'Time in MS' in the formula can be replaced with the respective time column.


Formula:
concat(floor("Time in MS"/(1000*60*60*24)),' days ',floor(Mod("Time in MS", 24*60*60*1000)/(60*60*1000)),' hours ',floor(mod(Mod("Time in MS", 24*60*60*1000),(60*60*1000))/(60*1000)),' minutes ',floor(Mod(mod(Mod("Time in MS", 24*60*60*1000),(60*60*1000)),(60*1000))/1000),' seconds')

Sample  Output:



                  New to ADSelfService Plus?

                    • Related Articles

                    • Formula createdtime() function throws error

                      Issue: When we create a formula column using the 'createdtime()' function, it throws unexpected error occurred. Analytics Plus Builds affected : 4300 & 4310 This is found as an issue within Analytics Plus and found happening on build 4300 and 4310. ...
                    • Make Change ID in Analytics Plus clickable - Hyper linking to SDP ticket

                      Requirement: To create a formula column in AnalyticsPlus for Change request as a 'URL' to respective ServiceDesk Plus Change request. Solution: Step 1: Open a Change request in ServiceDesk Plus and copy the URL in the address bar as shown below. ( ...
                    • Problem Module Data import

                      Importing Problem data into Analytics Plus:  You could log into the Analytics Plus 'ME ServiceDesk Plus Analytics' database and start creating these two tables using the below queries. Check this link for steps to import data from Local DB. Problem ...
                    • Make Request ID in Analytics Plus clickable - Hyper linking to SDP ticket

                      Here are the steps to add a column with Request ID as link to SDP tikcet. Step 1: Open a request from ServiceDesk Plus and copy the URL as shown below,  ( http://localhost:9090/WorkOrder.do?woMode=viewWO&woID=) Step 2: Create a custom formula in ...
                    • technician groups

                      If you want technician groups, then, use the below query in analytics plus  select qd.QUEUENAME "Support group", au.FIRST_NAME "Technician" from QueueDefinition qd  left join Queue_Technician qt on qd.QUEUEID=qt.QUEUEID  join SdUser sd on ...