> ## Documentation Index
> Fetch the complete documentation index at: https://rpa.bazhuayu.com/helpcenter/llms.txt
> Use this file to discover all available pages before exploring further.

# 增加/减少时间

## 指令说明

**描述：** 在指定日期时间上进行时间增加或减少，支持文本格式的日期

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/changedatetimecommand-01.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=4a143f366460aa03bf01dbbe4261efba" alt="增加/减少时间指令参数面板" width="813" height="647" data-path="helpcenter/commands/data-processing/images/changedatetimecommand-01.png" />

    | 参数            | 说明                                                      |
    | ------------- | ------------------------------------------------------- |
    | **原始时间**      | 输入调整前的时间，支持文本或常用时间格式，如：2010-03-25 00:00:00 或者2010-03-25 |
    | **调整方式**      | 增加或减少                                                   |
    | **时间长度**      | 输入时间长度（数值）                                              |
    | **时间单位**      | 秒、分钟、小时、天、月、年                                           |
    | **保存新的日期时间至** | 指定一个变量保存增加/减少后的时间                                       |
  </Tab>

  <Tab title="高级">
    本指令暂无高级参数。
  </Tab>
</Tabs>

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/changedatetimecommand-02.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=5b68df33fda505fdb0fc78f550a17a35" alt="增加/减少时间使用示例 - 流程搭建" width="813" height="647" data-path="helpcenter/commands/data-processing/images/changedatetimecommand-02.png" />

**该流程执行逻辑：**

本例演示【增加/减少时间】指令的配置与执行：

1. 传入原始日期时间。
2. 按设置的调整方式、时间长度和时间单位增加或减少时间，并将新日期时间保存到指定变量。

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/changedatetimecommand-03.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=8d767b15e09f2b4eb7bbea11265f95d8" alt="增加/减少时间使用示例 - 效果展示" width="1128" height="949" data-path="helpcenter/commands/data-processing/images/changedatetimecommand-03.png" />

<Info>
  使用指令过程中遇到问题？前往 [八爪鱼RPA 开发者社区问答板块](https://rpa.bazhuayu.com/community/questions) 提问，获取官方与社区帮助。
</Info>
