Microsoft KB Archive/136498

PRJ4: DateDifference Method Returns Incorrect Values

PSS ID Number: Q136498 Article last modified on 09-18-1995

4.00 | 4.00

WINDOWS | MACINTOSH

= SYMPTOMS =

When you use a resource calendar, if you use the DateDifference method in a Visual Basic procedure, the method returns an incorrect value.

= CAUSE =

This problem occurs if the following conditions are true:

  The base calendar the resource is using has a calendar exception. -and-   The date range the DateDifference method is using encompasses the calendar exception. 

= WORKAROUND =

To get the DateDifference method to return the correct value, modify the resource calendar so that it has the same exception as the base calendar.

= STATUS =

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

= MORE INFORMATION =

The DateDifference method disregards any calendar exception in the base calendar the resource is using and assumes working time is 8:00 AM-12:00 PM and 1:00 PM-5:00 PM with Saturday and Sunday as nonworking days.

KBCategory: kbprg KBSubcategory:

= Additional reference words: 4.00 timetrak =

Copyright Microsoft Corporation 1995.