On Aug 12, 2006, at 1:46 PM, Russ Jones wrote:
On Aug 12, 2006, at 4:34 PM, Terry Ford wrote:
The 'Dim date1 As New Date' statement will both dim and initialize
the date object.
But the new date gets initialized to the current system date, not
the date that was entered into the "PeriodEnding" field.
Be careful with this, because his example used today as the
periodending date.
You are absolutely correct. His code still has errors in
accomplishing his task. These lie in the code:
date1.TotalSeconds=d.TotalSeconds
date7.TotalSeconds=date1.TotalSeconds
date6.Day=date7.Day-1
date5.Day=date7.Day-2
date4.Day=date7.Day-3
date3.Day=date7.Day-4
date2.Day=date7.Day-5
date1.Day=date7.Day-6
The problem is he has assigned both Date7 and Date1 to d but has
ignored changing date6 to date2 away from their original assignments
in the new date. Change the periodending date and only date7 and
date1 are correct.
Terry
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>