Forums
This topic is locked
Leave application
Posted 12 Apr 2006 11:59:04
1
has voted
12 Apr 2006 11:59:04 chong lu yen posted:
hi..i want to do a leave application that can calculate how many days u take leave not including public holidays.Please help me? thanx
Replies
Replied 12 Apr 2006 20:09:26
12 Apr 2006 20:09:26 micah santos replied:
this code doesn't make the public holidays to be excluded, but definitely get the number of days between two dates using DateDiff. hope this helps.
<%
leaveStart = "04/11/006"
leaveEnd = "05/15/2006"
leaveStart = cDate(leaveStart)
leaveEnd = cDate(leaveEnd)
response.write DateDiff("d",leaveStart,leaveEnd)
%>
<%
leaveStart = "04/11/006"
leaveEnd = "05/15/2006"
leaveStart = cDate(leaveStart)
leaveEnd = cDate(leaveEnd)
response.write DateDiff("d",leaveStart,leaveEnd)
%>
Replied 13 Apr 2006 04:18:35
13 Apr 2006 04:18:35 chong lu yen replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
this code doesn't make the public holidays to be excluded, but definitely get the number of days between two dates using DateDiff. hope this helps.
<%
leaveStart = "04/11/006"
leaveEnd = "05/15/2006"
leaveStart = cDate(leaveStart)
leaveEnd = cDate(leaveEnd)
response.write DateDiff("d",leaveStart,leaveEnd)
%>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
thanx
this code doesn't make the public holidays to be excluded, but definitely get the number of days between two dates using DateDiff. hope this helps.
<%
leaveStart = "04/11/006"
leaveEnd = "05/15/2006"
leaveStart = cDate(leaveStart)
leaveEnd = cDate(leaveEnd)
response.write DateDiff("d",leaveStart,leaveEnd)
%>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
thanx