|
 |
aspx_professional thread: Date validation
Message #1 by "jeby" <jeby@c...> on Wed, 18 Sep 2002 15:03:20 +0530
|
|
I've created a function to validate the date value. But I passed the
value
as a string. I hope this would help.
public string StringToDate(string strValue)
{
string strRet =3D "";
DateTime dtVal;
if (strValue !=3D "")
{
try
{
dtVal =3D DateTime.Parse(strValue);
strRet =3D dtVal.ToString("dd")
+ "/" + dtVal.ToString("MM")
+ "/" + dtVal.ToString("yyyy");
}
catch (FormatException e)
{
DisplayMessage(e.Source + " : " +
e.Message);
}
}
return strRet;
}
-----Original Message-----
From: jeby [mailto:jeby@c...]
Sent: 2002=C4=EA9=D4=C218=C8=D5 19:33
To: ASPX_Professional
Subject: [aspx_professional] Date validation
Hi,
Could anyone help me with date validation (regular
expression-mm/dd/yyyy
format)?
Best Regards,
Jeby George
COMPUSOL Software Pvt. Ltd.
Bangalore - 560 004, INDIA.
This email and any files transmitted with it are confidential and
intended
solely for the use of the individual or entity to whom they are
addressed.
If you have received this email in error please notify the system
manager
and resend it to the sender and delete the mail. Any review,
retransmission,
dissemination or other use of, or taking of any action in reliance
upon,
this information by persons or entities other than the intended
recipient is
prohibited. Please note that any views or opinions presented in this
email
are solely those of the author and do not necessarily represent those
of the
company. Finally, the recipient should check this email and any
attachments
for the presence of viruses. The company accepts no liability for any
damage
caused by any virus transmitted by this email
---
ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=3D1861007442
ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=3D1861007450
These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples.
---
|
|
 |