UK Date Format Regular Expression

Discussion in 'ASP .Net' started by Niclas, Dec 2, 2005.

  1. Niclas

    Niclas Guest

    Hi,

    Does anyone have a Regular expression that validates a date in the UK format
    dd/MM/yyyy to share ?

    Many thanks

    Niclas
     
    Niclas, Dec 2, 2005
    #1
    1. Advertising

  2. first hit in google came up with this one

    http://www.codetoad.com/forum/22_18859.asp

    --
    Regards

    John Timney
    ASP.NET MVP
    Microsoft Regional Director

    "Niclas" <> wrote in message
    news:...
    > Hi,
    >
    > Does anyone have a Regular expression that validates a date in the UK
    > format dd/MM/yyyy to share ?
    >
    > Many thanks
    >
    > Niclas
    >
     
    John Timney \( MVP \), Dec 2, 2005
    #2
    1. Advertising

  3. Niclas

    Niclas Guest

    Yes saw that one, but it includes time as well. I am only interested in the
    date. Managed to rearrange a US format expression into UK, and think it is
    working

    Here it is if someone needs it:
    (0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d

    Niclas

    "John Timney ( MVP )" <> wrote in message
    news:...
    > first hit in google came up with this one
    >
    > http://www.codetoad.com/forum/22_18859.asp
    >
    > --
    > Regards
    >
    > John Timney
    > ASP.NET MVP
    > Microsoft Regional Director
    >
    > "Niclas" <> wrote in message
    > news:...
    >> Hi,
    >>
    >> Does anyone have a Regular expression that validates a date in the UK
    >> format dd/MM/yyyy to share ?
    >>
    >> Many thanks
    >>
    >> Niclas
    >>

    >
    >
     
    Niclas, Dec 2, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VSK
    Replies:
    2
    Views:
    2,400
  2. Brian Candy
    Replies:
    2
    Views:
    1,210
    Janaka
    Feb 18, 2004
  3. ThunderMusic

    Regular expression, how can I format it?

    ThunderMusic, Feb 2, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    2,196
    =?Utf-8?B?VEg=?=
    Feb 2, 2006
  4. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,380
    Michael Borgwardt
    May 30, 2004
  5. =?Utf-8?B?Qw==?=

    Regular Expression to enforce format?

    =?Utf-8?B?Qw==?=, Jun 29, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    396
    Kevin Spencer
    Jun 29, 2007
Loading...

Share This Page