[TOC] [Prev] [Next] [Bottom]



<@TIMETOSECS>, <@SECSTOTIME>

Syntax

<@TIMETOSECS TIME=time [FORMAT=format]>
<@SECSTOTIME SECS=
seconds [FORMAT=format]
[ENCODING=
encoding]>

Description

<@TIMETOSECS> checks the entered time and, if valid, converts it into seconds. Conversely, <@SECSTOTIME> converts the entered seconds to a time.

For details, see "<@ISDATE>, <@ISTIME>, <@ISTIMESTAMP>".

Both handle ODBC, ISO, and some numeric formats.

If the time is entered incorrectly--wrong separators or a nonexistent number of hours, minutes or seconds--the tag returns, "Invalid time!".

The TIME attribute is mandatory. If no attribute is found while the expression is parsed, the tag returns "No attribute!".

Examples

<@TIMETOSECS TIME=02:00:04>

This example returns "7204", the number of seconds contained in two hours and four seconds.

<@SECSTOTIME SECS=7204>

This example returns "02:00:04", the time in hour, minute and second format, assuming that is how times are configured with the timeFormat configuration variable.

See Also

Encoding Attribute
<@FORMAT>
Format Attribute
<@ISDATE>, <@ISTIME>, <@ISTIMESTAMP>
timeFormat



[TOC] [Prev] [Next] [Bottom]



docs@pervasive.com

Copyright © 1998, Pervasive Software Inc. All rights reserved.