Hi, I have this formula from blue prism: FormatDate(ToDate(FormatDate(Today(),"01/MM/yyyy")) - MakeTimeSpan(2, 0, 0, 0), "dd.MM.yyyy"). I want to replicate it in Automation Anywhere,for this I am using:
Line 76: And in the second action, 'Datetime: Assign', the setup used is this:
But, I am getting this System Error:
Best answer by Anand77
To extract the last day of the previous month from the current input date, follow these steps.
Extract the month and year from the input date in the format MM/yyyy.
Concatenate "01/" with the extracted month and year to form the first day of the same month.
Convert this concatenated string to a DateTime object.
Subtract one day from this Date Time object using the subtraction action from the Date Time package.
The resulting date will be the last day of the previous month.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.