Rexx - TIME



This method returns the local time in the 24-hour clock format as shown in the following program.

hh:mm:ss (hours, minutes, and seconds) 

Syntax

TIME(options)

Parameters

Options − This is the options for formatting the time value. They can be anyone of the following options −

  • Civil − This parameter returns the time in the format () wherein hh is hours, mm is minutes and xx is seconds

  • Elapsed − This parameter returns the number of seconds and microseconds since the elapsed-time clock was started or reset

  • Full − This parameter returns the number of microseconds since the date 1 January 0001

  • Hours − This parameter returns the number of hours that have passed since midnight

  • Minutes − This parameter returns the number of minutes that have passed since midnight

  • Normal − This parameter returns the time in the default format hh:mm:ss

  • Offset − This parameter returns the offset of the local time from UTC in microseconds.

Return Value

This method returns the local time in the 24-hour clock format − hh:mm:ss (hours, minutes, and seconds).

Example

/* Main program */ 
say TIME() 
say TIME("C") 
say TIME("H")

When we run the above program we will get the following result. This depends on the current time on the system.

The following program is just an example.

Output

10:54:12 
10:54am 
10 
rexx_built_in_functions.htm
Advertisements