Function IsPayDate(dateval)
Dim days
Dim base : base = CDate("6/12/2009")
If WeekDay(dateval) = 6 Then
days = DateDiff("d", base, dateval)
If (days Mod 14) = 0 Then
IsPayDate = True
End If
End If
End Function
Example...
For each d in Split("7/2/2009,7/3/2009,7/10/2009,7/24/2009", ",")
If IsPayDate(d) Then
wscript.echo d & " is a pay date"
Else
wscript.echo d & " is not a pay date"
End If
Next
No comments:
Post a Comment