CompareValidator for dates
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngbeta' list.


Malathi Senthil
a.. I'm using date in dd-mm-yyyy format as below. But the system seems to
allow only m/d/y format. What should be done to change the I/P format and
the value in ValueToCompare to accept dd-mm-yyyy format?
b.. For Operator value what should be used to implement >= (greater than
or equalto) ?

<asp:CompareValidator id="FromDateCompare" runat="server"
ControlToValidate = "txtFrmDt"
ValueToCompare = "17-05-2001"
Operator = "GreaterThan"
Type = "Date"
ErrorMessage = "* From Date must be after 17-05-2001"
Display = "dynamic">
* From Date must be after 17-05-2001
</asp:CompareValidator>

Regards,

S.Malathi, IT Project Analyst
ADNOC Distribution, IT Division
P.O. 4188
Abu Dhabi, U.A.E.

Tel : +971 2 6959480
Fax : +971 2 6742265
Reply to this message...
 
    
ritesh jain

Dear Malathi,

to compare the dates i always used a simple technique.just concatenate the
strings of dates like this
yyyy(year)+mm(month)+dd(date)

then convert it in to integer and compare them.I think this will work
better.

ritesh

[Original message clipped]

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

Reply to this message...
 
 
System.Web.UI.MobileControls.CompareValidator
System.Web.UI.WebControls.CompareValidator




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com