RF-获取上个月份

 验证1:

复制代码
case
    ${NowDate}    set variable    20170103
    ${year}    set variable    ${NowDate[0:4]}
    ${month}    set variable    ${NowDate[4:6]}
    ${Lastmonth}    set variable if    '${${month}}'=='${1}'    12
    ...    '${${month}}'=='${12}'    11
    ...    '${${month}}'=='${11}'    10
    ...    0${${month}-1}
    ${year}    set variable if    '${${month}}'=='${1}'    ${${year}-1}    ${year}
    ${LastMonthDate}    set variable    ${year}${Lastmonth}
复制代码

验证2:

验证3:

 

posted @   垄上行  阅读(304)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示