Question

How do I create a DateTime variable with a default value of 10:00 AM for the time, and a a default value of [today] (i.e. today's date, whatever that happens to be on the day I wish to use the variable) for the date. See attached.

  • 26 August 2022
  • 2 replies
  • 21 views

How do I create a DateTime variable with a default value of 10:00 AM for the time, and a a default value of [today] (i.e. today's date, whatever that happens to be on the day I wish to use the variable) for the date. The Edit Variable function will only allow me to set a default value for either BOTH the Date and the Time, or neither the Date and the Time. I want to set the default value for ONLY the Time four use on any day I use the variable.

See attached.


2 replies

Userlevel 3
Badge +7

Hi @Gregory Winkeleer​ ,

 

Could you give this a try and let us know if that works out for you?

 

image 

I've converted the string into datetime by concatenating the System Variable $SystemVariablePackage:CurrentDate$ which can be accessed from intellisense and 10:00 AM before passing it into the DateTime: Assign Action.

 

As for the format, I've selected Custom Format and passed this in:

MM-dd-yyyy hh:mm a

 

If you want to be more specific with the datetime, then here is a list of DateTime Formats currently supported by Automation Anywhere.

 

Kind Regards,

Ashwin A.K

Badge

Hi @Gregory Winkeleer​,

 

See if the following works for you:

 

imageimageimageimage 

All the best,

Lisa

Reply