添加持续时间变量
持续时间是以字符串形式表示的时间,采用 XML 日期数据标准规定的格式的子集。 持续时间的复合值为天、小时、分钟和秒。 持续时间长度是天、小时、分钟和秒值的总和。 您可以使用持续时间值来确定进程的 “一部分” 在继续之前应等待多长时间。
将持续时间变量添加到任务序列
在任务序列中,您可以向 “更新数据” 数据操作添加持续时间变量。 例如,
- 从工具箱中,展开 数据 类别,然后将 “ 更新数据” 操作拖动到任务中的所需位置。
- 在 “更新数据” 设计窗体的 “ 名称 ” 字段中,添加一个有意义的名称来描述项目。
- Click next to Update Statements and select Duration.
- 在 变量名称 字段中,键入标签以标识任务中的变量。
- 要在文字模式下设置值,请在 “要分配的 值 ” 字段中执行以下操作:
- Select the time unit (days, hours, minutes, seconds, milliseconds) in which you want to specify the duration value.
- Use the + or – buttons to set the desired duration value, or type it inline.
- 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.
- Select Expression and add the expression inline. Use the
- (Optional) To add another duration variable, click next to Update Statements.