Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for sorttime.vbs

(view source code of sorttime.vbs as plain text)

  1. ' SortTime.vbs,  Version 1.00 for Windows Script Host 2.00
  2. ' Display current time in HHmm format
  3. '
  4. ' Written by Rob van der Woude
  5. ' http://www.robvanderwoude.com
  6.  
  7. If DatePart("h",Time) < 10 Then
  8. 	strSortTime = "0" & DatePart("h",Time)
  9. Else
  10. 	strSortTime = DatePart("h",Time)
  11. End If
  12. If DatePart("n",Time) < 10 Then
  13. 	strSortTime = strSortTime & "0"
  14. End If
  15. strSortTime = strSortTime & DatePart("n",Time)
  16.  
  17. Wscript.Echo("SortTime=" & strSortTime)
  18.  

page last uploaded: 2017-08-21, 14:26