- Total Members: 220,018
- Threads: 525,385
- Posts: 976,987
-
November 13th, 2012, 07:31 PM
#1
Enable key in current date
Hi, May i know how to write a ASP code to show current date ? For the example, if user key in today date, the system will allow, while if the user key in previous date it will show error message. thank you.
as below is the ASP code, kindly advise, thank you.
DIM PINVDATE,PTQTY
PINVDATE = Request.Form("PINVDATE")
PTQTY = Request.Form("PTQTY")
If TRIM(PINVDATE) = "" and TRIM(PTQTY) = "" Then
Msg = "** Mandatory Field not filled, please check !!!"
Response.Redirect "plan.asp?empid="& EmpID & "&Name=" & EmpName & "&EmpLevel=" & EmpLevel & "&ref=" & Msg
else
If TRIM(PINVDATE) = "" THEN
Msg = "** Date not filled, Please Check !!!"
Response.Redirect "plan.asp?empid="& EmpID & "&Name=" & EmpName & "&EmpLevel=" & EmpLevel & "&ref=" & Msg
else
if TRIM(PTQTY) = "" then
Msg = "** Quantity not filled, Please Check !!!"
Response.Redirect "plan.asp?empid="& EmpID & "&Name=" & EmpName & "&EmpLevel=" & EmpLevel & "&ref=" & Msg
END IF
END IF
END IF
<tr>
<th bgcolor="#8585A6" ><font color="white">Date</font></th>
<th colspan = 3 bgcolor="#ECE5B6" align=left><input type ="text" name="PINVDATE" style="text-align: left" size = 23 maxlength="30"/><font color='Red'>** Exp: YYYY-MM-DD</font></th>
</tr>
Similar Threads
-
By valoukh in forum HTML, JavaScript And CSS Help
Replies: 3
Last Post: August 28th, 2008, 10:03 AM
-
By anh5001 in forum .NET Development
Replies: 4
Last Post: August 2nd, 2005, 11:31 AM
-
By essjay_d12 in forum SQL Development
Replies: 2
Last Post: April 27th, 2005, 09:33 AM
-
By beebul in forum ASP Development
Replies: 2
Last Post: September 21st, 2004, 06:11 AM
-
By fung in forum ASP Development
Replies: 2
Last Post: August 3rd, 2004, 12:45 AM