IIS 5 & IIS 6
Help with matching date with database
Last post Oct 18, 2016 09:37 AM by Yuk Ding
Oct 17, 2016 09:59 PM|cg84|LINK
Hello, Im trying to get a date from a textbox and check it against dates in a database table. table entry looks like this - "2016-10-15 00:00:00.000"It would give an alert warning if it matches saying that the date is a holiday.Thanks for any help!
txtdate = document.Form.ProStartDate.value
' get campus public holidays so as not to book start date
sqlhol = "Select id, date, descr from CampusHolidays"
set rs1 = conn.execute(sqlhol)
if not (rs1.eof and rs1.bof) then
do until rs1.eof
'rdate = rs1("date")
rdate = Month(rs1("date")) & "/" & Day(rs1("date")) & "/" & Year(rs1("date")) & ""
if rdate = txtdate then %>
alert("Matched date with <% & rs1(descr)%> ");
Oct 18, 2016 09:37 AM|Yuk Ding|LINK
I'm sorry that classic asp is not my specialty and this forum is mainly for application hosting problem.
If you need any code checking, I recommend you post your code to forum like asp.net or something else that dedicated for code discussion.