Time in 24 hour format in VBScript

vbscript

I am trying to get the system time in 24 hour format using VBScript. I had gone through the documents and found nothing. I need to compare the system date and time with my data and need to check the differences.

Best Solution

WScript.Echo right("0" & hour(time),2) & ":" & right("0" & minute(time),2)
WScript.Echo FormatDateTime(time, vbShortTime)