473,385 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to determinate if a string is a Date

ad
How can I determinate if a string is a Valid date.
For example
"2002/06/23", and "2002/6/23" all are valid date string, but "2002/23/06" is
not.
Jun 16 '06 #1
2 1485
Convert.ToDate with regional formate date or use Regexp
How can I determinate if a string is a Valid date.
For example
"2002/06/23", and "2002/6/23" all are valid date string, but "2002/23/06" is
not.


--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Jun 16 '06 #2
Mel
use DateTime.TryParse and it will return a boolean

"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
How can I determinate if a string is a Valid date.
For example
"2002/06/23", and "2002/6/23" all are valid date string, but "2002/23/06"
is not.

Jun 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ad | last post by:
The user of my asp.net program use Sql2005 or Sql2005 express as database, both are possible. I have try both version of data base, I found: If I use Sql2005 express, the Data Source in...
1
by: ad | last post by:
Hi, It will fail to call a web service when the connection to internet is not OK. I wnant to check the connection to internet before call a web service. How to determinate if the connection...
1
by: ad | last post by:
I want to write a MemoryStream to a buffer. I use the codes below; The code is from the msdn help, They always declare the size of buffer as the (length of memorystream)+1; The code run ok, but...
6
by: Xero | last post by:
How do you determinate whether a varible of data type 'Char' is null or not? I used the following code, but it seemed that it didn't work: Dim ans As Char If ans = "" Then MsgBox("Ans...
4
by: ad | last post by:
Hi, How to determinate if a Gridview is empty?
1
by: ad | last post by:
I want to determinate if a value in a Text is digital or character. How can I determinate it with Javascript
7
by: ad | last post by:
I want to determinate if there are alphabets in a string. (not all number) How can I do?
2
by: ad | last post by:
I want to determinate if there are 2 alphabets in a string at least "12ab34", "123a5bc", "a123c4" is ok, but "2345", 2a35" is not ok.
13
by: ad | last post by:
I want to determinate if there no symbol in a string? for example "12ab34", "123a5bc", "a123c4" is ok, but "23#45", 2a,35" is not ok.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.