sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
Tim's Avatar

ASP & Date Functions


Question posted by: Tim (Guest) on July 19th, 2005 06:32 AM
Hi, I was wondering if there was a function in ASP that
checks a date to see if it is valid or not. I am aware
of the IsDate function, but I think its not what I'm
looking for. I want to run the following date through a
function and have the function tell me that it is
invalid: 31-Feb-2003 (cos there is not 31 days in Feb).

Does anyone know of a function to help me? Or a good way
to make my own function?

TIA>
2 Answers Posted
Ray at's Avatar
Guest - n/a Posts
#2: Re: ASP & Date Functions

If you do some string manipulation with your date, you can still use IsDate.
How are you getting your date? Will you know if it will always be
Day-Month-Year? If so, you can re-arrange the string and test it. Like,
IsDate will return true for "Feb 28 2003" (with my US regional settings).
So, just rearrange your string and use IsDate still.

Ray at home

"Tim" <timj@smithscity.co.nz> wrote in message
news:074801c345d3$e95391d0$a501280a@phx.gbl...[color=blue]
> Hi, I was wondering if there was a function in ASP that
> checks a date to see if it is valid or not. I am aware
> of the IsDate function, but I think its not what I'm
> looking for. I want to run the following date through a
> function and have the function tell me that it is
> invalid: 31-Feb-2003 (cos there is not 31 days in Feb).
>
> Does anyone know of a function to help me? Or a good way
> to make my own function?
>
> TIA>[/color]


Bob Barrows's Avatar
Guest - n/a Posts
#3: Re: ASP & Date Functions

Please don't multipost. I've already replied to this question over at
..asp.db. If you feel you must direct your question at multiple
newsgroups*, then post one single message to the desired groups by
putting the group names into the To list (aka crosspost)

*.asp.db is the only group you needed to post this to. Your question
concerns asp and database code: absolutely no ambiguity.

Bob


 
Not the answer you were looking for? Post your question . . .
197,028 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,028 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors