Since your code retrieves the uptime value directly and simply translates to "human readable" form, it is not subject to timezone offsets. Lonk's code reads the remote boot time, then subtracts that from the LOCAL current time to calculate the uptime. If the two computers are in different time zones, the result would be inaccurate. My UDF gets both boot and current time from the remote computer. This way, both values are relative to each other, and the calculation is correct. With Lonk's UDF, if I reboot a computer on the west coast (I'm on the east coast) and immediatly run the uptime udf, it reports 4 hours and some minutes, due to the 4 hour difference between time zones.

I like your concept, but the reliance on SNMP is an issue for me in my environment. I haven't found a way to obtain a direct uptime value from remote computers without calculations or third party tools (which basically do the same calculations). WMI reports boot time on all platforms that support WMI, but I havent found that it reports uptime on the same platforms.

Bottom line - there's no issue with your UDF other than the need for SNMP.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D