Skip to main content
Question

Help with set text to return date in MM/DD/YYYY format

  • December 19, 2022
  • 7 replies
  • 340 views

Forum|alt.badge.img+4

Hello,

I am trying to do a set text action on web field to insert the current date in MM/DD/YYYY format. For example, if the bot ran today I need the set text action to write 12/19/2022 in the web field. Thanks! 

7 replies

Pradeep Kintali
Most Valuable Pathfinder
Forum|alt.badge.img+5
  • Most Valuable Pathfinder
  • 127 replies
  • December 19, 2022

@harperjg  - In DateTime package, there is a action ToString, you can convert your date into specified format and you can save in String. use this variable for SetText action


Raul Jaimes
Forum|alt.badge.img+9
  • Navigator | Tier 3
  • 494 replies
  • December 19, 2022

@harperjg ,

Try to use the custom format in DataTime package

Example:

 

HTH

Regards


Forum|alt.badge.img+4
  • Author
  • Navigator | Tier 3
  • 12 replies
  • December 19, 2022

Thanks @Pradeep Kintali , I have found that function but not sure how to use it in this case. Could you attach some screen shots showing how to do this? I am relatively new to Automation Anywhere and still learning where everything is in the app. Thanks! 


Forum|alt.badge.img+1
  • Cadet | Tier 2
  • 3 replies
  • December 19, 2022

Hi

Use action Datetime to string

Source date & time variable: System:Date

Custom format MM/dd/yyyy

Assign output to string variable e.g. vTodayDate

 

Use variable in the web field

 


Forum|alt.badge.img+4
  • Author
  • Navigator | Tier 3
  • 12 replies
  • December 19, 2022

Oh, disregard @Pradeep Kintali you answered my question. I was at that point but did not realize that you could manually enter in a format. Thanks! 


Forum|alt.badge.img+19
  • Most Valuable Pathfinder
  • 2693 replies
  • December 19, 2022

Hi @harperjg 

Use String : Assign command provide System variables CurrentDay/CurrentMonth/CurrentYear under Source String, use this variable in the SetText action for passing the current date dynamically


Forum|alt.badge.img+4
  • Author
  • Navigator | Tier 3
  • 12 replies
  • December 19, 2022

Yep, got it:

Thanks All! :-)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings