<@DATEOSECS DATE=date [FORMAT=format]>
<@SECSTODATE SECS=seconds [ENCODING=encoding] [FORMAT=format]>
<@DATEOSECS> checks the entered date and, if valid, converts it into seconds using as a reference---midnight (00:00:00) January 1, 1970 (1970-01-01).
Conversely, <@SECSTODATE> checks the entered seconds and converts them to a date.
These tags support dates in the range 1970-2037.
Both tags handle ODBC, ISO, and some numeric formats.
If the date is entered incorrectly--wrong separators or wrong values for year, month, or day--the tag returns "Invalid date!".
The date attribute is mandatory. If no attribute is found while the expression is parsed, the tag returns "No attribute!".
Note: When a two-digit year is
given, the following centuries are assumed:
Value |
Century |
For example, a two-digit year of 99 is evaluated as 1999, and a two-digit year of 00 is evaluated as 2000.
This tag returns "0", the number of seconds since January 1, 1970.
This tag returns "946684800", the number of seconds since January 1, 1970.
This tag returns "2000-01-01", the date derived from the number of seconds. The example assumes a dateFormat of "%Y-%m-%d".
dateFormat,
timeFormat, timestampFormat
Encoding Attribute
<@FORMAT>
Format Attribute
<@ISDATE>, <@ISTIME>,
<@ISTIMESTAMP>
<@TIMETOSECS>, <@SECSTOTIME>
<@TSTOSECS>, <@SECSTOTS>
Copyright © 1999, Pervasive Software. All rights reserved.