Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

Re: Time range help please 08:00am-02:00pm

  •  05-07-2007, 4:15 PM

    Storm [st] Re: Time range help please 08:00am-02:00pm

    Ranges, while they can be done, are a really bad application of regex. If you have a range of values and are only selecting one, that's one thing but you are wanting it to understand a range.  You'd be better served using a datetime function to evaluate this.

    A regex of this nature will not guarantee a proper range because regexes don't understand time, just text.  If I put in a time 02:00 PM - 08:00AM it isn't going to know the order is wrong (or going backwards)


    Michael

    "In theory, theory and practice are the same. In practice, they are not."
    Albert Einstein
View Complete Thread