Add a duration variable

A duration is a representation of time expressed as a string in a subset of the format prescribed by the XML date data standard. Durations have a composite value of days, hours, minutes, and seconds. The length of the duration is the sum total of days, hours, minutes, and seconds values. You can use a duration value to determine how long a “portion” of a process should wait before proceeding.

Add a duration variable to a task sequence

In a task sequence, you can add a duration variable to an Update Data data action. For example, 

  1. From the Toolbox, expand the Data category and drag an Update Data action to the desired location in the task.
  2. On the Update Data design form, in the Name field, add a meaningful name to describe the item.
  3. Click next to Update Statements and select Duration.
  4. In the Variable Name field, type the label to identify the variable on tasks.
  5. To set the values in literal mode, in the Value To Assign field, do the following:
    1. Select the time unit (days, hours, minutes, seconds, milliseconds) in which you want to specify the duration value.
    2. Use the + or  buttons to set the desired duration value, or type it inline.
  6. To set the value using an expression, in the Value To Assign field, click the expression modes button and do one of the following:
    • Select Expression and add the expression inline. Use the MakeDuration function to specify the duration value.
    • Select Expression and click to open the large expression editor and build your expression.
  7. (Optional) To add another duration variable, click next to Update Statements