Solved

2005 Visual Studio Date Validation

Posted on 2006-11-03
2
298 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

770 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