Setting current date
One answer
Hi,
I am trying to set the current date to a variable using .set command.
This is how I am trying to do:
.set env <env_group> "DATE=.date %d-%b-%y.%H:%M:%S"
But, this is not setting the date. Can you help me on this?
Thanks
Ankit
Hi,
That syntax for the .date dot command will not work. If you want to stick with the .set, the only thing I can think of is to set your selector to point to a Unix based computer and have the step execute something like this:
.set env MyEnv "CURRENT_DATE_TIME=`date "+%d-%b-%y.%H:%M:%S"`"
The one thing to note about this is that you'll more than likely need to have the environment property _NO_PREPARSE_COMMAND set so that the command gets sent to the agent without any alterations.
Brent Ulbricht
RTC Build Lead