Skip to main content

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! 

@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


@harperjg ,

Try to use the custom format in DataTime package

Example:

 

HTH

Regards


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! 


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

 


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! 


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


Yep, got it:

Thanks All! :-)


Reply