Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not a regular expression, but would either of these work?
Function IsValidDate(sDte) As Boolean Dim dte As Date If IsDate(sDte) Then dte = CDate(sDte) IsValidDate = Year(dte) = 2000 And Year(dte) <= 2010 End Function Function IsValidDate2(sDte) As Boolean Const Ptn1 As String = "200#-##-##" Const Ptn2 As String = "2010-##-##" IsValidDate2 = sDte Like Ptn1 Or sDte Like Ptn2 End Function -- HTH :) Dana DeLouis Windows XP & Office 2007 "PO" <h wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can someone help me with this regular expression? | Excel Discussion (Misc queries) | |||
Excel formula needed... regular expression? | Excel Discussion (Misc queries) | |||
Regular Expression | Excel Discussion (Misc queries) | |||
Regular Expression for cell address | Excel Programming | |||
Regular expression searching problem | Excel Programming |