$TIME returns an alphanumeric value with the specified or current time in the specified format.
This function has the following format:
$TIME ('time‑specification'[,TIME=time])
A sequence of characters (maximum 30) that represent components and notation of the time, as follows:
Component Example (Assuming
Notation Meaning (:03:08 am)
H Hour without leading zeros
(24‑hour clock) 9
HH Hour with leading zero 09
PP Hour with leading zero, (12‑hour
clock with AM/PM indication) 09 AM
P Same but without leading zero 9 AM
MM Minutes with leading zero 03
SS Seconds with leading zero 08
Any character in the format, except uppercase alphabetics, remains unchanged. You must explicitly specify spacing and punctuation.
A six‑character alphanumeric literal in the format of 'HHMMSS' or a six‑character alphanumeric field with a value in that format. If you do not specify the TIME operand, the current time is used.
Examples
Assume that it is 9:03:08 am and FIELD contains 121336
|
$TIME Function Invocation |
Result |
|---|---|
|
$TIME ('HH:MM:SS') |
09:03:08 |
|
$TIME ('H:MM') |
9:03 |
|
$TIME ('PP:MM') |
09:03 AM |
|
$TIME ('HH‑MM‑SS',TIME=FIELD) |
12‑13‑36 |
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|