-
Notifications
You must be signed in to change notification settings - Fork 30
Getting started with the DateTime activity
The DateAndTime activity allow you to easily perform operations on DateTime objects within your workflow. These can be to generate DateTimes as strings, or make comparisons between DateTimes. In this example we aim to show the basic steps that are required to get the activity integrated into a build.
Before you can make use of any of the community build activities you have to make sure they are available for the build system and on your development PC. Instructions for this process can be found in the ALM Rangers build guide or in the getting started page of this wiki. This page assumes the DataAndTime activity is available in the developers build process workflow toolbox.
First we need to create a build variable to store the generated values. This will usually a String unless you are using the activity to get a boolean to make a branching decision
The activity can be added anywhere in the build workflow. The properties you need to set are dependant on the action selected
The minimum properties you need to set for each possible action are as follows
Action | Required | Optional | Output |
---|---|---|---|
AddDays | Format, Value | Start | Result |
AddHours | Format, Value | Start | Result |
AddMilliseconds | Format, Value | Start | Result |
AddMinutes | Format, Value | Start | Result |
AddMonths | Format, Value | Start | Result |
AddSeconds | Format, Value | Start | Result |
AddTicks | Format, Value | Start | Result |
AddYears | Format, Value | Start | Result |
CheckBetween | Start, End | UseUtc | BoolResult |
CheckLater | Start | UseUtc | BoolResult |
Get | Format | UseUtc | Result |
GetElapsed | Format, Start | End, UseUtc | Result |