cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
TechkyDude
Engaged Sweeper
Hi

I created a report in which I basically display hostname, ip address & UPTIME.
The uptime showup me the info in minutes is there is a way to change the format to hours or days instead?


1 REPLY 1
Hemoco
Lansweeper Alumni
Uptime data is actually stored in seconds. You can perform calculations with SQL to get the uptime in minutes, hours or days.

Ceiling (tblAssets.Uptime / 60 ) -> uptime in minutes
Ceiling (tblAssets.Uptime / 60 / 60 ) -> uptime in hours
Ceiling (tblAssets.Uptime / 60 / 60 / 24 ) -> uptime in days


A sample report that lists the uptime in hours can be seen below.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
Ceiling(tblAssets.Uptime / 60 / 60) As Uptime
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssetCustom.State = 1
Order By tblAssets.IPNumeric