Skip to main content

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

 

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.


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