marc_butler
asked on
Calculate Working Days
Hi All,
Ive found this code on an existing post. But when I change it to meet my needs it wont work. Please see below code.
This is the error I get;
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "10/03/2009"]'
/hr/RTW_Form.asp, line 5
On line 5 if I change Request.Form("LastDateOfAb sence") for Date() it works fine.
Any idea's?
Beav
Ive found this code on an existing post. But when I change it to meet my needs it wont work. Please see below code.
This is the error I get;
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "10/03/2009"]'
/hr/RTW_Form.asp, line 5
On line 5 if I change Request.Form("LastDateOfAb
Any idea's?
Beav
<%
If Request.Form("FirstDateOfAbsence") <> "" And Request.Form("LastDateOfAbsence") <> "" Then
Dim strWorkingDays
strWorkingDays = 0
For i = Request.Form("FirstDateOfAbsence") To Request.Form("LastDateOfAbsence")
If WeekDay(i) <> 7 And WeekDay(i) <> 1 Then
strWorkingDays = strWorkingDays + 1
End If
Next
Response.Write(strWorkingDays)
End If
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Your welcome, I think you are anyway?
Have a good one.
Carrzkiss
Have a good one.
Carrzkiss
ASKER
Im sorry carrzkiss,
Thank you very muchly.
Beav
Thank you very muchly.
Beav
You are so very welcome.
I knew you would come in and say thank you....
You rock.
Keep up the coding.
Carrzkiss
I knew you would come in and say thank you....
You rock.
Keep up the coding.
Carrzkiss
Wrapping it around a Form("") item....?
Still checking.
Carrzkiss