PdcApplication.WorkingDate: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == WorkingDate(StartDate as Date, Date2) as integer == Description == Returns the number of working days between two dates. == Notes == This function calcula..."
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Declaration ==
== Declaration ==
WorkingDate(StartDate as Date, Date2) as integer
WorkingDate(StartDate as Date, NumOfDays as integer) as Date


== Description ==
== Description ==
Returns the number of working days between two dates.  
Returns the calculated date of a date plus the applied number of working days.


== Notes ==
== Notes ==
This function calculates the number of working days between two dates. The calculation is based on the table of non working days.
Returns the calculated date of a date plus the applied number of working days. The calculation is based on the table of non working days in PdC.


== Code example ==
== Code example ==
This example returns the number of working days of the following seven days from now. Normally the answer is 5.
This example returns the calculated date of today plus 5 working days. Normally the answer is today plus 7 days.


<source lang="vb">
<source lang="vb">
   msgbox pdc.NoOfWorkingDays(Date(), Date() + 7)
   msgbox pdc.WorkingDate(Date(), 5)
</source>
</source>


== Availability ==
== Availability ==
Available since April 2014 (from version 4.3)
Available since 2011 (from version 4.1)

Latest revision as of 14:55, 22 April 2014

Declaration

WorkingDate(StartDate as Date, NumOfDays as integer) as Date

Description

Returns the calculated date of a date plus the applied number of working days.

Notes

Returns the calculated date of a date plus the applied number of working days. The calculation is based on the table of non working days in PdC.

Code example

This example returns the calculated date of today plus 5 working days. Normally the answer is today plus 7 days.

  msgbox pdc.WorkingDate(Date(), 5)

Availability

Available since 2011 (from version 4.1)