yep thanks, i did this yesterday, sharing for posterity
r = CreateObject("roRegex", "...,\s(\d{1,2})\s([\S]+)\s(\d{4})\s([\S]+)\s.*","")
dateMatch = r.Match(hdrs.date)
if (dateMatch.Count() > 4)
' convert text month to numeric
mymonth = getNumericMonth(dateMatch[2])
if (mymonth <> invalid)
datetimestr = dateMatch[3] + "-" + mymonth + "-" + dateMatch[1] + "T" + dateMatch[4] + "z"
end if
end if
and my function to convert the name of the month:
function getNumericMonth(month as string)
abbrvmonth = Lcase(month.Left(3))
if (abbrvmonth = "jan")
returnmonth = "01"
elseif (abbrvmonth = "feb")
returnmonth = "02"
elseif (abbrvmonth = "mar")
returnmonth = "03"
elseif (abbrvmonth = "apr")
returnmonth = "04"
elseif (abbrvmonth = "may")
returnmonth = "05"
elseif (abbrvmonth = "jun")
returnmonth = "06"
elseif (abbrvmonth = "jul")
returnmonth = "07"
elseif (abbrvmonth = "aug")
returnmonth = "08"
elseif (abbrvmonth = "sep")
returnmonth = "09"
elseif (abbrvmonth = "oct")
returnmonth = "10"
elseif (abbrvmonth = "nov")
returnmonth = "11"
elseif (abbrvmonth = "dec")
returnmonth = "12"
end if
return returnmonth
end function
aspiring