Newbie: Checking if Date exists (i.e. Feb. 31 = False)

S

steve

Hi,
As the subject says:
I can't seem to find a method to determine wether an assembled string (e.g.
31/09/1994) is an existing date. I mean September didn't have 31 days in
1994.

Any help would be appreciated.

TIA
-steve
 
B

Benjamin Pierce

Hi Steve,

Take a look at the IsDate() function, that should do the trick for you.


Regards,

Ben
 
Y

Yunus's Group

Steve,

If you are validating the date at the server side using VB.NET, you can
use "IsDate(MyDate)". This function returns True or False based on the
input that you feed.

Thanks,
 
C

Cor Ligthert

Yunus,
If you are validating the date at the server side using VB.NET, you can
use "IsDate(MyDate)". This function returns True or False based on the
input that you feed.
This can be a very dangerous method. You have to know what localization is
used in a webpage. By instance French (speaking) Canada and English
(speaking) Canada use differnt dateformats. Therefore 1/12/2005 can mean in
the first 1 decembre while it is in the second January 12.

However both are valid with IsDate

Just as addition.

Cor
 

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

Top