<@DATETOSECS>, <@SECSTODATE>Syntax<@DATEOSECS DATE=date [FORMAT=format]> <@SECSTODATE SECS=seconds
[FORMAT=format]
Description<@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). For dates before this, the return values are negative. Conversely, <@SECSTODATE> checks the entered seconds and converts them to a date. All formats assume the Gregorian calendar. All years must be greater than zero. 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!". ExamplesThis tag returns "0", the number of seconds since January 1, 1970. This tag returns "-86400", the number of seconds since January 1, 1970. This tag returns "1969-12-31", the date derived from the number of seconds. The example assumes a dateFormat of "%Y-%m-%d". See Also dateFormat,
timeFormat, timestampFormat
|
Copyright © 1998, Pervasive Software Inc. All rights reserved.