Cos (number), Datetime, Default – Xylem STORM 3 Basic Programming manual User Manual
Page 15

13
Commands and Functions
Returns the cosine value of the given number.
var = COS(0) REM sets var to 1
var = COS(PI) REM sets var to -1
COS (number)
Used to retrieve parts of the current date and time. Available arguments are DATE, DATE$, TIME,
TIME$, DAY, JDAY, MONTH, YEAR, SECONDS, MINUTES, HOURS, EPOCH, EPOCHDAY. DATE
and TIME return integer values of the current date and time formatted as YYMMDD and HHMMSS
respectively. The DATE$ and TIME$ arguments return a similar format as string values, specifically
“MM/DD/YYYY” according to the Storm’s Date Format setting and “HH:MM:SS” respectively.
SECONDS, MINUTES, HOURS, DAY, MONTH, and YEAR each return a two-digit integer value of the
specified current date or time subsection. JDAY returns a three-digit integer value of the Julian
Day. EPOCH returns an integer value of the number of seconds since 00:00:00 Jan 1, 1970 while
EPOCHDAY returns the number of seconds from 00:00:00 Jan 1, 1970 until the start of today’s date
at 00:00:00.
DATETIME
var = DATETIME(DATE)
var$ = DATETIME(TIME$)
var = DATETIME(TIME)
var$ = DATETIME(TIME$)
var = DATETIME(DAY)
var = DATETIME(JDAY)
var = DATETIME(MONTH)
var = DATETIME(YEAR)
var = DATETIME(SECONDS)
var = DATETIME(MINUTES)
var = DATETIME(HOURS)
var = DATETIME(EPOCH)
var = DATETIME(EPOCHDAY)
REM sets var to 130903
REM sets var$ to 09/03/2013
REM sets var to 83058
REM sets var$ to 08:30:58
REM sets var to 3
REM sets var to 246
REM sets var to 9
REM sets var to 13
REM sets var to 58
REM sets var to 30
REM sets var to 8
REM sets var to 1378197058
REM sets var to 1378166400
REM Presuming today’s date and time are Sept 3, 2013 at 08:30:58
Used within a SWITCH-CASE statement to mark the default route if no other CASE statements
are matched.
var = DATETIME(MINUTES)
path = 0
SWITCH var
CASE 0:
path = 1
BREAK
DEFAULT