Question

Convert Datetime to String Inline

  • 4 August 2022
  • 4 replies
  • 411 views

Userlevel 3
Badge +9

Is there a way to convert a Datetime variable to string-type in line?

 

For instance, lets say I assign the current date to "Today-Date" variable.

 

Can I then type $Today-Date:ToString$ or something like that in a message box action so that the date is converted to a string inline?


4 replies

Userlevel 6
Badge +9

Hi @Logan Price​ ,

Thank you for writing to us,

Please look into the below documentation:

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-convert-datetime-to-string.html/p>

 

Hope this helps.

Userlevel 3
Badge +9

Hi Sahana,

The documentation you provided shows the separate "to string" action of the DateTime package. I want to avoid using extra actions.

I wanted to know if I could bypass this action and instead directly convert a datetime to string in-line in any action, just like numbers and Booleans.

Thanks,

Logan

Userlevel 3
Badge +6

@Logan Price​ These are called properties and can be created using package SDK easily.

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/developer/cloud-expose-action-property.html/p>

Userlevel 3
Badge +9

Thank you.

Reply