![](/img/trans.png)
[英]How to convert date format from yyyy-mm-dd to yymmdd base on python Robot Framework
[英]How to convert date format from dd/mm/yyyy to yyyy-mm-dd base on RIDE python robot framework
如果我收到來自網頁的消息到18/05/2020
。 我想把它轉換成這樣的格式: 2020-05-18
我嘗試使用% Y-% m-% d
轉換的日期,但是出現了錯誤,值不匹配錯誤我該怎么辦?
您需要從DateTime
庫中Convert Date
並指定結果格式和前向輸入:
${converted} Convert Date 18/05/2020 result_format=%Y-%m-%d date_format=%d/%m/%Y
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.