Solved

Custom datetime

  • 27 March 2024
  • 1 reply
  • 32 views

Badge +3

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: 

 

 

icon

Best answer by Anand77 27 March 2024, 10:06

View original

1 reply

Badge +1

To extract the last day of the previous month from the current input date, follow these steps.

  1. Extract the month and year from the input date in the format MM/yyyy.
  2. Concatenate "01/" with the extracted month and year to form the first day of the same month.
  3. Convert this concatenated string to a DateTime object.
  4. Subtract one day from this Date Time object using the subtraction action from the Date Time package.
  5. The resulting date will be the last day of the previous month.

 

 

Input - 27-03-2024.

 

Reply