ASP & Date Functions

T

Tim

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>
 
R

Ray at

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
 
B

Bob Barrows

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top