Date to UTC Time:
Code: Select all
Function ConvertToUTC(strDate,iOffset)
On Error Resume Next
strUTC=Right(Year(strDate),2)&Pad(Month(strDate),2,"0",True) &_
Pad(Day(strDate),2,"0",True) & Pad(Hour(strDate),2,"0",True) &_
Pad(Minute(strDate),2,"0",True) & Pad(Second(strDate),2,"0",True)
'ConvertToUTC=DateAdd("h",strUTC,iOffSet)
ConvertToUTC=strUTC
End Function
Code: Select all
Function GetRand(iLower,iUpper)
Randomize
GetRand=Int((iUpper - iLower + 1) * Rnd + iLower)
End Function
Code: Select all
Function GetOS(strComputer)
Dim objWMI
Set objWMI=GetObject("winmgmts://" & strComputer).InstancesOf("win32_operatingsystem")
For Each OS In objWMI
GetOS=OS.Caption
Next
End Function
Code: Select all
Function ProperCase(strText)
strVal=UCase(Left(strText,1))
For x=2 To Len(strText)
strTemp=Mid(strText,x,1)
if Asc(strTemp) >= 65 And Asc(strTemp) <= 90 Then
strVal=strVal & Lcase(strTemp)
Else
strVal=strVal & strTemp
End If
Next
ProperCase=strVal
End Function
If you have any interesting function that you find others could use feel free to post.
WARNING: No Script Functions Requests HERE Please!