Skip to content

Latest commit

 

History

History
55 lines (32 loc) · 1.48 KB

Project.Application.DateSubtract.md

File metadata and controls

55 lines (32 loc) · 1.48 KB
title ms.service api_name ms.assetid ms.date ms.localizationpriority
Application.DateSubtract method (Project)
project-server
Project.Application.DateSubtract
1eb05a59-271d-31d0-8945-23bc3c9600e0
06/08/2017
medium

Application.DateSubtract method (Project)

Returns the date and time that precedes another date by a specified duration, for an automatically scheduled task.

Syntax

expression. DateSubtract( _FinishDate_, _Duration_, _Calendar_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
FinishDate Required Variant The date used as the end of the duration.
Duration Required Variant The duration to subtract from the finish date.
Calendar Optional Object A resource, task, or base calendar object. The default value is the calendar of the active project.

Return value

Variant

Remarks

To subtract a duration from a date for a manually scheduled task, which uses an effective calendar that can include non-working time, use the EffectiveDateSubtract property.

Example

The following example displays the start date of a task that lasts three days and ends on 7/13/02 at 5:00 P.M.

Sub FindDuration() 
 MsgBox DateSubtract("7/13/02 5:00 PM", "3d") 
End Sub

[!includeSupport and feedback]