Solved

Cutom Datetime

  • 13 May 2024
  • 2 replies
  • 27 views

I have a problem with creating dates, how can today's date come out on the previous date and can also today come out on today's date?

Example:
20240513 to 20240512
20240513 still on 20240513

thanks

 

icon

Best answer by jon.stueveapeople 7 June 2024, 18:06

View original

2 replies

Userlevel 3
Badge +7

refer to this help document for Datetime formats:
https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-date-time-formats.html

If you want to add a date, first assign the date to a DateTime variable, then use the DateTime:Add action to add or subtract from the varibale the DateTime:toString to output in the desired format.

Userlevel 3
Badge +7

Also, remember that the $CurrentTime$ is the time of the runner, so it might be a different date/time than your system.

your code looks correct, but the devil is in the details of the Action properties

Reply