Answered

How can I set a variable to hold a time using 12-hour format instead of 24-hour format?

0
4 comments
Avatar
Payam Fard

Use Set_Date command with the formatting that suites you. In this case, use HHmm to set the time using 12-hour format or hhmm to set the time using 24-hour format. Subject7 platform uses the same formatting as Java, see the reference https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html

The following image shows the commands for 12-hour on the first step, 24-hour on the second step and the time as shown when the command was executed.

0
Comment actions Permalink
Avatar
Anjali Mutha

Here even if we use hhmm or HHmm, the format is set to 12-hour format currently.

 

0
Comment actions Permalink
Avatar
Payam Fard

Anjali, just executed your test case, and it is providing 24-hour format. Please see the screen shot below. Would you please retry?

 

0
Comment actions Permalink
Avatar
Anjali Mutha

Its working now.

Thanks :)

0
Comment actions Permalink

Please sign in to leave a comment.