> ## 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/datetimeconverttotimestampcommand-02.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=f9f752742dc827e1bb4db48800afd15e" alt="日期时间转换为时间戳指令参数面板" width="648" height="402" data-path="helpcenter/commands/data-processing/images/datetimeconverttotimestampcommand-02.png" />

    | 参数        | 说明                                    |
    | --------- | ------------------------------------- |
    | **日期时间**  | 输入日期时间，若日期是文本，只支持常用格式。若保留为空，则默认系统当前时间 |
    | **时间戳级别** | 选择时间戳级别，分别为秒级、毫秒级、微秒级                 |
    | **生成的变量** | 保存时间戳变量                               |
  </Tab>

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

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/datetimeconverttotimestampcommand-01.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=4730e29c2b16867b1f8c375dc05fa0d3" alt="日期时间转换为时间戳使用示例" width="853" height="151" data-path="helpcenter/commands/data-processing/images/datetimeconverttotimestampcommand-01.png" />

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

1. 获取系统当前日期时间，并将其传入【日期时间转换为时间戳】。
2. 指令把日期时间转换为时间戳数值，并保存到结果变量。
3. 使用【打印日志】输出该变量，确认转换后的时间戳结果。

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/datetimeconverttotimestampcommand-03.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=b473219146e018bccf13dc57f4b5011f" alt="日期时间转换为时间戳效果展示" width="839" height="221" data-path="helpcenter/commands/data-processing/images/datetimeconverttotimestampcommand-03.png" />

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