View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Peter T[_7_] Peter T[_7_] is offline
external usenet poster
 
Posts: 162
Default Efficient standard to military time


"Robert Crandal" wrote in message

As written it your code would return an incorrect time with "AM", try
lCase(tMeridiem) = "am"


I thought because I
set IgnoreCase equal to True that it would have worked for both
"am" and "AM" cases. Guess I was wrong.


IgnoreCase makes matching against the pattern insensitive, however the
SubMatches will return the matched element of the input string in its
original case.

Regards,
Peter T