Skip to main content
Answer

System Variable Error

  • December 30, 2024
  • 2 replies
  • 60 views

Forum|alt.badge.img

I'm trying to get today's date using 'System: Date', but it's getting the date from one year later. How can I solve this?

Best answer by botL

If you are converting the System:Date using a custom datetime format of YY or YYYY, that causes an error in the year during the last week and first week of a year. Use yy or yyyy instead. I encountered the same error today but a colleague found this documentation, which clarified things: https://docs.automationanywhere.com/bundle/enterprise-v2019/page/custom-datetime-formats.html#d472e67

2 replies

Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+14
  • Automation Anywhere Team
  • December 30, 2024

I’m not seeing the same issue.

What date format are you using?

 


Forum|alt.badge.img+2
  • Cadet | Tier 2
  • Answer
  • December 30, 2024

If you are converting the System:Date using a custom datetime format of YY or YYYY, that causes an error in the year during the last week and first week of a year. Use yy or yyyy instead. I encountered the same error today but a colleague found this documentation, which clarified things: https://docs.automationanywhere.com/bundle/enterprise-v2019/page/custom-datetime-formats.html#d472e67