1、获取年月日时分秒格式的数据
命令:${time}= Get Current Date result_format=%Y%m%d%H%M%S
日期时间显示结果显示形式:20230908102553


2、获取时间戳形式的数据
命令:
${time}= Get Current Date result_format=timestamp
${time_stamp} Convert Date ${time} epoch
${time_stamp_ms} evaluate int(round(${time_stamp}*100))
日期时间戳结果显示形式:169408381914


本文介绍了在自动化脚本中使用两种不同的方法获取日期和时间:一种是年月日时分秒格式,另一种是时间戳形式。详细展示了获取和转换的命令及其结果输出。

2089

被折叠的 条评论
为什么被折叠?



