View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Help with regular expression

If that value is really a date, you could just use

dim myDate as date
mydate = dateserial(2007,5,2)

if year(mydate) < 2000 _
or year(mydate) 2010 then
'error
else
'ok
end if



PO wrote:

Hi,

Can anybody help me with a regular expressions pattern for a date?

YYYY-MM-DD

i.e. 2007-05-02
The year may range between 2000 and 2010.

TIA
po


--

Dave Peterson