Date format, Type into

I m working on a automation where I have to download a report on the first of every month, attached is image of the application I’m using. The automation will run on the 1st of September. in the image attached there is are two date pickers that also allow for the user to type the date into. the format is 7/1/2021. I want to use a type into activity on both the date picker boxes. If the robot were to run September 1st would have to type 8/1/2021 in the box under the is on or after, and 8/31/2021 under the is on or before box. This automation will run every month so in October it would have to type 9/1/2021 and 9/30/2021. any ideas on how to go about this?

My idea was to do a type into activity for both date boxes just not sure how datecode.pdf (24.0 KB)
would code the date and the date format section

Hi @NATHAN_MORA - So you need last month first date and last date right? Say For Aug you need 07/01 and 07/31 correct??

Yes correct,

@NATHAN_MORA - here you go…


Would i add that into the type into activity?

I could also use that in a assign activity and add that variable into the type into activity ?

You can see it returns the output as a string variable, so Yes you can add it as is in the type into activity…You don’t have to create/assign a variable. But if you wish you can assign the above statements to the two string variables and then pass it to Type into activity.

  StrLastDtPrvMonth = Now.AddDays(-Now.Day).tostring("MM/dd/yyyy")
  StrFirstDtPrvMonth = now.AddDays("MM/dd/yyyy")

Hope this helps…

If i were to run it today or tomorrow and needed July reports from July1st-july 31st how would i write that date code?

@NATHAN_MORA - Anytime if you run it…it will always get you the last month’s first date and Last date…

Please see the step by step construction here…


if its not clear, please let me know…

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.