Solved

2005 Visual Studio Date Validation

Posted on 2006-11-03
2
301 Views
Last Modified: 2008-02-20
Good Afternoon

I have a DataGridView that contains a User Entry column.  I load a default value dates into the column in the MM/DD/YYYY format.  The user can accept the default or change it to a different value.  Is there a function that will tell me if what the user entered is a valid date regardless of the format?  In other words, does vb.net "know" or have a list of acceptable date formats that it can check a value against and say if it matched a correct format or not?

Thanks,
Ed
0
Comment
Question by:lbsi
2 Comments
 
LVL 34

Accepted Solution

by:
Sancler earned 450 total points
ID: 17868340
Try the Visual Basic IsDate() function.  See here

    http://msdn2.microsoft.com/en-us/library/00wf8zk9.aspx

Roger
0
 
LVL 28

Assisted Solution

by:strickdd
strickdd earned 50 total points
ID: 17868484
If you want to use a validator control, you can use the <asp:RangeValidator type="Date"...
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question