Date/time, Epoch seconds, Midnight seconds – Visara Master Console Center Scripting Guide User Manual
Page 40: Date and time literals
Chapter 3 Script Syntax
Scripting Guide
40
Date/Time
The date and time type functions allow great flexibility in manipulating
and formatting of time values. All date and time values are based on the
number of seconds past a certain point in time. The Date/Time function
only uses two points in time:
Seconds past epoch.
Seconds past midnight.
Epoch Seconds
Epoch seconds is the number of seconds past the Epoch time. Epoch time
is January 1, 1970 at the time of 00:00:00—the beginning of January 1,
1970. There are two ways of obtaining the epoch seconds for “now”:
%EpochSecs := SECONDS()
%EpochSecs := DATE() + TIME()
Both obtain the same result.
Midnight Seconds
Midnight seconds is the number of seconds past midnight, in other words,
the number of seconds that has elapsed for the day.
%MidSecs := TIME( “04:08:24”) // %MidSecs == 14,904
Date and Time Literals
Just as character string literals are delimited with quotes, date/time
literals are delimited by pound signs “#”. All time literals are based on
the 24-hour clock.
Using a date literal has the same results as using the “DATE()”
command. Using a time literal has the same results as the “TIME()”
command.
#04:00#
//means
4am
#16:00#
//means
4pm
#4/11/92#
//April 11, 1992