Popup notice window if duedate is within 48hrs

preeti164

Member
Joined
Oct 27, 2008
Messages
7
Programming Experience
Beginner
I want to display a popup window notice if duedate is within 48 hrs from today's date.Can someone please tell me what would be the if condition?
 
VB.NET:
Dim DueDate As DateTime = #10/29/2008 5:00:00 PM#

If ((DueDate - DateTime.Now()).TotalHours) < 48 Then
    ...
 
or
VB.NET:
If Now> DueDate.AddHours(-48) then

End If
 
VB.NET:
Dim DueDate As DateTime = #10/29/2008 5:00:00 PM#

If ((DueDate - DateTime.Now()).TotalHours) < 48 Then
    ...
or
VB.NET:
If Now> DueDate.AddHours(-48) then

End If

there is a little change required in the above code I want to display popscreen if for example duedate is Monday, 10/06/2008. and Start Date or Modified date is on Thursday, 10/03/2008. When the user clicks the Save button the pop up should display. Even though it is more than 48 hours the weekend should not count, only business hours. I want to compare due date with startdate or modifieddate.Can you please tell me what i need to do?
 
So you're saying that if the due date is on Monday or Tuesday then push the hour check out by 48 hours.

VB.NET:
If DueDate.DayOfWeek = DayOfWeek.Monday OrElse DueDate.DayOfWeek = DayOfWeek.Tuesday Then
    Hours = 96
Else
    Hours = 48
End If

If ((DueDate - DateTime.Now()).TotalHours) < Hours Then
    ...
 
So you're saying that if the due date is on Monday or Tuesday then push the hour check out by 48 hours.

VB.NET:
If DueDate.DayOfWeek = DayOfWeek.Monday OrElse DueDate.DayOfWeek = DayOfWeek.Tuesday Then
    Hours = 96
Else
    Hours = 48
End If

If ((DueDate - DateTime.Now()).TotalHours) < Hours Then
    ...


No actually they are saying that if duedate is within 48hrs of createddate or modified date then display msessage.So if duedate is monday (10/06/2008)and createddate/modifieddate is thursday(10/03/208) then When the user clicks the Save button the pop up should display. Even though it is more than 48 hours the weekend should not count, only business hours.
 
No actually they are saying that if duedate is within 48hrs of createddate or modified date then display msessage.So if duedate is monday (10/06/2008)and createddate/modifieddate is thursday(10/03/208) then When the user clicks the Save button the pop up should display. Even though it is more than 48 hours the weekend should not count, only business hours.

...Exactly.
 
Back
Top