Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Setting current date

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

0 votes



One answer

Permanent link
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

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Jul 20 '11, 2:28 p.m.

Question was seen: 3,668 times

Last updated: Jul 20 '11, 2:28 p.m.

Confirmation Cancel Confirm