0

How to send email Notification with below date and Time format in header of email

2020-12-31  01-30-25 PM 

I am able to derive time by creating 3 local variables then concatenating them but time is displaying in 24-hr format

%%HOURS            %%SUBSTR %%TIME 1 2
%%MINUTES          %%SUBSTR %%TIME 3 2
%%SECONDS          %%SUBSTR %%TIME 5 2

Contaminating above local variables %%HOURS.:%%MINUTES.:%%SECONDS

TylerH
  • 20,799
  • 66
  • 75
  • 101
NorthPole
  • 27
  • 7

1 Answers1

0

I am afraid that is the only system variable that Control-M supplies (in terms of time). To be honest, there's not much demand for 12 hour based times. The only way would be to set your own Control-M user variable by displaying the system time and setting the variable like so (the pre- or post command field is good for this).

Mark
  • 316
  • 1
  • 5
  • could you please help me how do I create user variable and derive time in 12-hr format. Appreciate your help – NorthPole Sep 05 '20 at 01:50
  • Then you will need to display the system time in 12 hour output and pipe the result into the ctmvar utility, which sets Control-M variables - ctmvar -action set -var \%\%\\12HR_TIME -varexpr "your_input_here" – Mark Sep 09 '20 at 21:02