0

I already achieved to get calendar days:

*** Test Cases *** 
Get Date & Time on Banner
    ${date_var}    get text    ${LOCATOR}
    log    ${date_var}    console=yes
    ${time}    Get Time    NOW
    ${plus}    Add Time To Date    ${time}    14 days 
    ${convert}    Convert Date    ${plus}    result_format=%Y-%m-%d %H:%M 
    log    ${convert}    console=yes
    Should Be Equal    ${date_var}    ${convert}    ELSE    Log    console=yes

Output is Pass:
2020-07-10 10:24 
2020-09-16 16:30

Could someone help how to achieve calc against system date for business days (excluding weekdays/holidays)?

R N
  • 19
  • 3
  • 1
    Is it the correct piece of code? I don't think it will execute – Dev Sep 03 '20 at 04:20
  • Yes, it is. This worked perfectly fine on RED. Could you or someone help figure out business days solution? – R N Sep 07 '20 at 16:06
  • AFAIK , I don't see the definition of `B_PO.Get date 14 days` and keyword section does not contain the keyword of same name. Can you explain which keyword accepting this argument `[Arguments] ${input_var}`? Also consider to give example of use case. Many times it happens that there is good solution for the problem but question framed incorrectly makes it difficult. Please read [mcve] and edit your post accordingly and follow this in all future post. This will help you to get quick good responses. – Dev Sep 07 '20 at 16:55
  • I appreciate your feedback that simplified questions receive a quicker response. Therefore, edited the question, and hopefully makes more sense now. Looking forward to hear on business days solution :-) – R N Sep 09 '20 at 02:13
  • There are some straightforward python solutions in https://stackoverflow.com/questions/12691551/add-n-business-days-to-a-given-date-ignoring-holidays-and-weekends-in-python/23352801 ; you can then import them as a library, which is cleaner, or translate them to just-Robot. – Adam Burke Sep 09 '20 at 03:19

0 Answers0