<%
Mydate1 = CDate(rs(Max_Date))
MyDate2 = CDate(User_Date)

Result = DateDiff("d", Mydate1, MyDate2)

If Result = 0 Then
        ...do something
Else
        ...do not do anything
End If 

%>



Hope this helps



-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Bob Filipiak
Sent: Thursday, September 15, 2005 4:34 PM
To: [email protected]
Subject: Re: [ASP] HTML Form Date compare with resultset date

CDate(User_Date) should convert your text field to a Date.
----- Original Message ----- 
From: "Kirpa Mehta" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, September 14, 2005 2:45 PM
Subject: [ASP] HTML Form Date compare with resultset date


>
> rs(Max_Date)=9/14/05 (Database value)
> User_Date=9/10/05 (HTML Text Box)
>
> I want to check if user_date is equal to Max_Date or less than
Max_Date, 
> Program shows error message otherwise it process. How to i compare it
as 
> User_Date is a type "TEXT" in my HTML form and Max_Date i got from 
> resultset. PLEASE HELP
>
> Thanks,



<html><body><p class="MsoNormal"><font face="Arial" style="font-size: 
8pt">____________________________________________________________<br>CRBAfrica 
- providing professional debt management and credit reference <br>bureau 
services in Kenya, Uganda, Botswana, Tanzania, Ghana, Zambia, <br>Mauritius and 
Egypt.<br>____________________________________________________________<br>AccessKenya
 - Your Corporate ISP - CRB's solution provider for fast <br>efficient Email 
and Internet 
Services<br>____________________________________________________________<br><br><br>ATTENTION<br>____________________________________________________________<br>The
 information in this electronic mail message is private and confidential 
<br>and only for the addressee. Should you receive this message by mistake, 
<br>you are hereby notified that any disclosure, reproduction, distribution or 
<br>use of this message is strictly prohibited. Please inform the sender by 
reply <br>transmission and delete the message without copying or opening it. 
Any <br>unauthorised use or interception of this e.mail is illegal. If this 
e.mail is not <br>intended for you, you may not copy, distribute or disclose 
the contents to <br>anyone. Save for the bona fide company matters, the CRB 
Group of <br>companies does not accept responsibility for the opinions 
expressed in <br>this 
e.mail.<br>____________________________________________________________</font></p></body></html>





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/17folB/TM
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [email protected]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to