Resolve %%TIME variable without seconds...?

All questions about Control-M jobs definitions
Post Reply
User avatar
Dilbert
Nouveau
Nouveau
Posts: 185
Joined: 10 Jan 2007 12:00
Location: Zagreb, Croatia

Resolve %%TIME variable without seconds...?

Post by Dilbert » 27 Oct 2008 1:22

Hello, ppl!

How I can pass %%TIME auto-edit variable withous seconds, only in HHmm format?

I need to pass current system date and time to unix command prompt and set date/time on unix machine. I successfully resolved variables for date (using $$DAY, %%MONTH, %%$YEAR), but i can't set variable for time, Unix required time in HHmm.ss format, CONTROL-M resolved %%TIME variable as hhmmss.

How I can solve that, how I can pass %%TIMEvariable in hhmm format? Any suggestions?

User avatar
Dilbert
Nouveau
Nouveau
Posts: 185
Joined: 10 Jan 2007 12:00
Location: Zagreb, Croatia

Post by Dilbert » 27 Oct 2008 2:03

Problem solved, using %%SUBSTR variable. ;)

Anyway, thnx all!

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 28 Oct 2008 1:50

In set panel:

RESULT=%%SUBSTR %%TIME 1 4

and the %%RESULT variable is "HHMM" .

User avatar
Dilbert
Nouveau
Nouveau
Posts: 185
Joined: 10 Jan 2007 12:00
Location: Zagreb, Croatia

Post by Dilbert » 28 Oct 2008 1:59

mauriziog wrote:In set panel:

RESULT=%%SUBSTR %%TIME 1 4

and the %%RESULT variable is "HHMM" .
Thanks, already solved it with %%SUBSTR, after little reading documentation and experimenting. :)

Post Reply