> ## 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/convertdatetimetextcommand-01.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=054d3ae2efa6b4de69248936eeb0275e" alt="时间文本格式转换指令参数面板" width="640" height="501" data-path="helpcenter/commands/data-processing/images/convertdatetimetextcommand-01.png" />

    | 参数            | 说明                                                                                                 |
    | ------------- | -------------------------------------------------------------------------------------------------- |
    | **原始文本**      | 输入时间格式的文本字符串； 支持常用日期时间格式，如："2023-08-08"、"2023/08/08"、"2023年8月8日 00时00分00秒"等；格式可参考【选择/输出格式】的下拉时间格式； |
    | **自定义格式解析文本** | 勾选是否使用自定义解析原始文本的格式                                                                                 |
    | **自定义解析格式**   | 输入自定义解析原始文本的格式                                                                                     |
    | **选择/输出格式**   | 设置输出的日期时间格式                                                                                        |
    | **保存时间文本至**   | 指定一个变量名称，该变量用于保存转换后的时间文本                                                                           |
  </Tab>

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

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/convertdatetimetextcommand-03.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=809c22c7321a8a74cc98c89a05fbb2b4" alt="时间文本格式转换使用示例" width="650" height="488" data-path="helpcenter/commands/data-processing/images/convertdatetimetextcommand-03.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/convertdatetimetextcommand-02.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=ec8529f881ad0530a606ae1d68f521b6" alt="时间文本格式转换使用示例 - 流程搭建" width="928" height="243" data-path="helpcenter/commands/data-processing/images/convertdatetimetextcommand-02.png" />

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

使用【获取当前日期时间】把当前时间保存至变量

使用【时间文本格式转换】指令将当前日期时间按指定格式转换成文本并保存结果

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/convertdatetimetextcommand-04.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=0706ce77d78bfe1bd0ad442a2eeb7fa7" alt="时间文本格式转换使用示例 - 效果展示" width="1348" height="190" data-path="helpcenter/commands/data-processing/images/convertdatetimetextcommand-04.png" />

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