User`s manual

Functions Functions2-13
NEWYEAR()
Returns a 1.0 if the year has changed since the last
time the algorithm has been run. Otherwise, it returns
a 0.0. The result is a short ON transition once per year
at 12 midnight on January 1st. Parenthesis accepts no
arguments, but empty parenthesis must still be placed
at the end of this function name in the equation.
NEWYEAR() result: ON transition once
per year
NEWYEAR result: ERROR (no paren-
thesis)
TIME()
Returns the current time in the number of seconds
since midnight. Parenthesis accepts no arguments, but
empty parenthesis must still be placed at the end of
this function name in the equation.
TIME() at 00:01:00 result: 60
TIME() at 06:45:00 result: 24300
TIME result: ERROR (no parenthesis)
MINUTE()
Returns the minute portion of the current time. Paren-
thesis accepts no arguments, but empty parenthesis
must still be placed at the end of this function name in
the equation.
MINUTE() at 00:14:00 result: 14
MINUTE() at 12:00:00 result: 0
MINUTE result: ERROR (no parenthe-
sis)
HOUR()
Returns the hour portion of the current time in 24-hour
format. Parenthesis accepts no arguments, but empty
parenthesis must still be placed at the end of this func-
tion name in the equation.
HOUR() at 00:14:00 result: 0
HOUR() at 14:00:00 result: 14
HOUR result: ERROR (no parenthesis)
DAY()
Returns the day of the month. Parenthesis accepts no
arguments, but empty parenthesis must still be placed
at the end of this function name in the equation.
DAY() on 01/07/2005 result: 7
DAY() on 02/28/1985 result: 28
DAY result: ERROR (no parenthesis)
MONTH()
Returns a number from 1-12 representing the month of
the year. Parenthesis accepts no arguments, but empty
parenthesis must still be placed at the end of this func-
tion name in the equation.
MONTH() on 01/07/2005 result: 1
MONTH() on 09/07/1974 result: 7
MONTH result: ERROR (no parenthe-
sis)
YEAR()
Returns the current year in four-digit format. Paren-
thesis accepts no arguments, but empty parenthesis
must still be placed at the end of this function name in
the equation.
YEAR() on 01/07/2005 result: 2005
YEAR result: ERROR (no parenthesis)
ISLEAP()
If the current year is a leap year, returns a 1.0. Other-
wise, returns 0.0. Parenthesis accepts no arguments,
but empty parenthesis must still be placed at the end of
this function name in the equation.
ISLEAP() on 01/07/2005 result: 0.0
ISLEAP() on 01/01/2008 result: 1.0
ISDST()
If daylight savings time is active, returns a 1.0. Other-
wise, returns 0.0. Parenthesis accepts no arguments,
but empty parenthesis must still be placed at the end of
this function name in the equation.
ISDST() on 01/07/2005 result: 0.0
ISDST() on 07/04/2005 result: 1.0
DAYOFWEEK()
Returns a number from 0-6 based on the current day of
the week from Sunday (0) to Saturday (6). Parenthesis
accepts no arguments, but empty parenthesis must still
be placed at the end of this function name in the equa-
tion.
DAYOFWEEK() on 01/07/2005 result:
5.0 (Friday)
DAYOFWEEK() on 07/04/2005 result:
1.0 (Monday)
DAYOFYEAR()
Returns a number from 0-364 based on the current day
of the year, from Jan 1 (0) to Dec 31 (364, or 365 if a
leap year).
DAYOFYEAR() on 01/07/2005 result:
7
DAYOFYEAR() on 07/04/2005 result:
185
YEARFRAC()
Returns a decimal from 0.0 to 1.0 equal to the current
DAYOFYEAR divided by the number of days in the
year.
YEARFRAC() on 01/07/2005 result:
0.02
YEARFRAC() on 07/04/2005 result:
0.51
Function Description Examples
Table 2-15
- Time and Date Functions