IBM 15 Switch User Manual


 
149
CLEM Language Reference
Function
Result
Description
datetime_time(ITEM)
Time
Returns the time value of the gi ven ITEM.
datetime_timestamp(YEAR,
MONTH, DAY, HOUR, MINUTE,
SECOND)
Timestamp
Returns the timestamp value for the given YEAR,
MONTH, DAY, HOUR, MINUTE, and SECOND.
datetime_timestamp(DATE,
TIME)
Timestamp
Returns the timestamp value for the given DATE and
TIME.
datetime_timestamp (NUMBER)
Timestamp
Returns the timestamp value of the given number of
seconds.
datetime_weekday(DATE)
Integer
Returns the day of the week from the given DATE or
timestamp.
datetime_year(DATE)
Integer
Returns the year from a DATE or timestamp. The
result is an integer such as 2002.
date_weeks_difference (DATE1,
DATE2)
Real
Returns the time in weeks from the date or timestamp
represented by DATE1 to that represented by DATE2,
as a real number. This is based on a week of 7.0 days.
If DATE2 is before DATE1, this function returns a
negative number.
date_years_difference (DATE1,
DATE2)
Real
Returns the time in years from the date or timestamp
represented by DATE1 to that represented by DATE2,
as a real number. This is an approximat e gure based
on a year of 365.25 days. If DATE2 is before DATE1,
this function returns a negative number.
time_before(TIME1, TIME2)
Boolean
Returns a value of true if TIME1 represents a time
or timesta
mp before that represented by TIME2.
Otherwise, this function returns a value of 0.
time_hours_difference (TIME1,
TIME2)
Real
Returns the time difference in hours between the times
or timestamps represented by TIME1 and TIME2, as
a real number. I f you select Rollover days/mins in the
stream properties dialog box, a higher value of TIME1
is taken to refer to the previous day. If you do not
select th e rollover option, a higher value of TIME1
causes the returned value to be negative.
time_in_hours(TIME)
Real
Returns the time in hours represented by TIME, as a
real number. For example, under time format HHMM,
the expression time_in_hours('0130') evaluates to 1.5.
TIME can represent a time or a timestamp.
time_in_mins(TIME)
Real
Returns the time in minutes represented by TIME,
as a real number. TIME can represent a time or a
timestamp.
time_in_secs(TIME)
Integer
Returns the time in seconds represen t ed by TIME, as
an integer. TIME can represent a time or a timestamp.