Time & Date Functions - Crestron SIMPL+ Reference Manual

Language reference guide
Hide thumbs Also See for SIMPL+:
Table of Contents

Advertisement

Software
Time & Date Functions
®
242
SIMPL+
Time and Date Functions Overview
Time and Date functions in a given SIMPL+ program are used to retrieve information
about the current date and time from the system clock. Values can be retrieved as
either text strings i.e. "January" or as integer values. Typically, integer values are
used if computations need to be performed (i.e. when the date is the 25th, perform a
specific action).
Date
Name:
Date
Syntax:
STRING Date(INTEGER FORMAT);
Description:
Returns a string corresponding to the current date with the specified FORMAT.
Parameters:
FORMAT is an integer describing the way to format the date for the return. Valid
formats are 1 through 4.
FORMAT 1 returns a string in the form MM/DD/YYYY
FORMAT 2 returns a string in the form DD/MM/YYYY
FORMAT 3 returns a string in the form YYYY/MM/DD
FORMAT 4 returns a string in the form MM/DD/YY
In format 4, the year 2000 is shown as 00. Digits 58 - 99 are treated as 1958-1999 and
00-57 are treated as 2000 through 2057.
Return Value:
A STRING corresponding to the current date.
Example:
STRING TheDate$[100];
FUNCTION MAIN()
{
TheDate$=DATE(1);
PRINT("The date is %s\n", TheDate$);
}
This would print a string such as "The date is 03/25/2002".
Version:
SIMPL+ Version 1.00
Crestron SIMPL+
Language Reference Guide - DOC. 5797G
®

Advertisement

Table of Contents
loading

Table of Contents