IBM 15 Switch User Manual


 
148
Chapter 8
Function
Result
Description
date_in_weeks(DATE)
Real
Returns the time i n weeks from the baseline date to
the date or timestamp represented by DATE, as a real
number. This is based on a week of 7.0 days. If DATE
is before the baseline date, this function returns a
negative number. You must inclu de a valid date for
the calculatio n to work appropriately. Fo r example,
you should not specify 29 February 2001 as the date.
Because 2001 is a not a leap year, this date does not
exist.
date_in_years(DATE)
Real
Returns the time in years from the baseline date to
the date or timestamp represented by DATE, as a real
number. This is an approximate gure based on a
year of 365.25 days. If DATE is before the baseline
date, this function returns a negative number. You
must include a valid date f or the calculation to work
appropriately. For example, you should not specify 29
February 2001 as the date. Because 2001 is a not a
leap year, this date does not exist.
date_months_difference
(DATE1, DATE2)
Real
Returns the time in months 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 month of 3 0.4375 days. If DATE2 is before
DATE1, this function returns a negative number.
datetime_date(YEAR, MONTH,
DAY)
Date
Creates a date value for the given YEAR, MONTH, and
DAY. The arguments must be integers.
datetime_day(DATE)
Integer
Returns the day of the month from a given DATE or
timestamp. The result is an integer in the range 1 to 31.
datetime_day_name(DAY)
String
Returns the full name of the given DAY. The argument
must be an integer in the range 1 (Sunday) to 7
(Saturday).
datetime_hour(TIME)
Integer
Returns the hour from a TIME or timestamp. The
result is an integ er in the range 0 to 23.
datetime_in_seconds(TIME)
Real
Returns the seconds portion stored in TIME.
datetime_in_seconds(DATE),
datetime_in_seconds(DATE-
TIME)
Real
Returns the accumulated number, converted into
seconds, from the difference between the current DATE
or DATETIME and the baseline date (1900-01-01).
datetime_minute(TIME)
Integer
Returns the minute from a TIME or timest amp. The
result is an integ er in the range 0 to 59.
datetime_month(DATE)
Integer
Returns the month from a DATE or timestamp. The
result is an integ er in the range 1 to 12.
datetime_month_name
(MONTH)
String
Returns the full name of the given MONTH. The
argument must be an integer in the range 1 to 12.
datetime_now
Timestamp Returns the current time as a timestamp.
datetime_second(TIME)
Integer
Returns the second from a TIME or times t amp. The
result is an integ er in the range 0 to 59.
datetime_day_short_
name(DAY)
String
Returns the abbreviated name of the given DAY. The
argument must be an integer in the range 1 (Sunday)
to 7 (S
aturday).
datetime_month_short_
name(MONTH)
String
Returns the abbreviated name of the given MONTH.
The argument must be an integer in the range 1 to 12.
datetime_time(HOUR, MINUTE,
SECOND)
Time
Returns the time value for the specied HOUR,
MINUTE, and SECOND. The arguments must be
integers.