Return UTC with Parsing

email me

Set dateTime = CreateObject(“WbemScripting.SWbemDateTime”)
dateTime.SetVarDate (now())
UniversalDate = dateTime.GetVarDate (false)
a=Split(UniversalDate,” “,2)
for each myDate in a
exit for
next

msgbox “My Date: ” & (UniversalDate)

‘returns hour
strHour = DatePart(“h”, UniversalDate)

‘returns day in year
strDayInYear = DatePart(“y”, UniversalDate)

‘returns day in month 1-31
strDayInMonth = day(UniversalDate)

‘returns day in week 1-7
strWeekDay = Weekday(UniversalDate)
msgbox strHour
msgbox strDayInYear
msgbox strDayInMonth
msgbox strWeekDay