C
Coleen
Hi all
I have a bit of code that chacks for the last day of the Month, and if it falls on a week-end, sets the due date to the Monday after...
I'm trying to get the date to go to the Tuesday afterward, if the last day of the month falls on the week-end and the Monday afterwards is a holiday... to test I set the date to 11/30/2006, to make the due date fall on 12/31/2006 which is a Sunday and makes 1/1/2007 a holiday.
I've put in the following code:
If ls_day = "Sunday" Then
ld_due_dt = DateAdd(DateInterval.Day, 1, ld_rpt_date)
ld_holiday = Format(ld_due_dt, "MM/dd")
If ld_holiday = "01/01" Or ld_holiday = "05/31" _
Or ld_holiday = "09/01" Or ld_holiday = "11/30" Then
If ls_day = "Monday" Then
ld_due_dt = DateAdd(DateInterval.Day, 1, ld_rpt_date)
lbl_due.Text = ld_due_dt
End If
End If
Else
lbl_due.Text() = ls_duedate
End If
For some reason, the ld_holiday date keeps coming back with the value of #1/1/2004# Weird. How can I get it to come back with 1/1/2007, so I can test? TIA
Coleen
I have a bit of code that chacks for the last day of the Month, and if it falls on a week-end, sets the due date to the Monday after...
I'm trying to get the date to go to the Tuesday afterward, if the last day of the month falls on the week-end and the Monday afterwards is a holiday... to test I set the date to 11/30/2006, to make the due date fall on 12/31/2006 which is a Sunday and makes 1/1/2007 a holiday.
I've put in the following code:
If ls_day = "Sunday" Then
ld_due_dt = DateAdd(DateInterval.Day, 1, ld_rpt_date)
ld_holiday = Format(ld_due_dt, "MM/dd")
If ld_holiday = "01/01" Or ld_holiday = "05/31" _
Or ld_holiday = "09/01" Or ld_holiday = "11/30" Then
If ls_day = "Monday" Then
ld_due_dt = DateAdd(DateInterval.Day, 1, ld_rpt_date)
lbl_due.Text = ld_due_dt
End If
End If
Else
lbl_due.Text() = ls_duedate
End If
For some reason, the ld_holiday date keeps coming back with the value of #1/1/2004# Weird. How can I get it to come back with 1/1/2007, so I can test? TIA
Coleen