Is there a certain format you want the date & time displayed?
Eg I currently have the below code & it returns the date and time as: Tuesday, June 11, 2013 - 21:18:56
Code: Select all
Let>COMMA=,
HTTPRequest>http://www.time.gov/timezone.cgi?Central/d/-6,,Get,,ResVar
Let>text=%ResVar%
Let>pattern=(?:2[0-3]|[01][0-9])[:.][0-5][0-9][:.][0-5][0-9]|(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday),[ \t]+(?:January|February|March|April|May|June|July|August|September|October|November|December)[ \t]+(?:1[0-2]|[1-9]),[ \t]+[0-9]{4}
RegEx>pattern,text,0,Matches,NumMatches,0,,
MDL>%matches_3% - %matches_2%
Formatted in the style you listed (6-11-2013 10:14:13 PM)
Code: Select all
Let>COMMA=,
HTTPRequest>http://www.time.gov/timezone.cgi?Central/d/-6,,Get,,ResVar
Let>text=%ResVar%
Let>pattern=(?:2[0-3]|[01][0-9])[:.][0-5][0-9][:.][0-5][0-9]|(?:January|February|March|April|May|June|July|August|September|October|November|December)[ \t]+(?:1[0-2]|[1-9]),[ \t]+[0-9]{4}
RegEx>pattern,text,0,Matches,NumMatches,0,,
StringReplace>%matches_3%,%COMMA%,,matches_3
Let>DandT=%matches_3% %matches_2%
VBSTART
VBEND
VBEval>FormatDateTime("%DandT%"),vFormattedTime
StringReplace>vFormattedTime,/,-,vFormattedTime
MDL>%vFormattedTime%