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

<@ISDATE>, <@ISTIME>, <@ISTIMESTAMP>

Syntax

<@ISDATE VALUE=date>

<@ISTIME VALUE=time>

<@ISTIMESTAMP VALUE=timestamp>

Description

These tags attempt to parse the input value and see if it is a valid date, time, or timestamp, respectively. The intent of the tags is to detect as wide a variety of formats as possible, thus allowing users greater choice in inputting values. The tags evaluate to the value "1" or "0".

If the value contains spaces, it must be quoted (single or double, as appropriate).

The tags currently support the following date/time/timestamp formats:

ISO Date Format

There are three ways to specify a date in ISO format:


! Note: Note that the calendar year may be different from the week year. For example, 1998-W01-2=1997-12-31, is December 31, 1997.


ISO Time Format

An ISO time is specified in a 24-hour clock format: hh:mm:ss

The string may be preceded by a capital T, and may have a decimal fraction portion consisting of a comma or period followed by one to nine digits. Colons are all-or-none optional.


! Note: ISO allows 24:00 to indicate 00:00:00 on the next day, but Tango does not allow this.


ISO Timestamp Format

An ISO timestamp format is simply the concatenation of a date and a time in that order, with the capital T before the time mandatory. Again, no spaces ever appear in an ISO format, for example,
"1998-05-01T12:00:00".

ODBC Formats

ODBC date/time string formats are very strict. No special interpretation is required.

ODBC Date Format

Dates are specified yyyy-mm-dd using calendar dates. The full width of each field must be provided. Use leading zeroes to pad fields to full width. Hyphens are required.

ODBC Time Format

The time format hh:mm:ss.fffffffff is a triple of two-digit numbers representing a 24-hour time, with colons required, followed by an optional fraction portion consisting of a period with one to nine decimal digits afterwards. Use leading zeroes to pad fields to full width.

ODBC Timestamp Format

Timestamps are made by specifying a date, followed by a single space, followed by the time.

Numeric Formats

A numeric format is defined to be a date or time specified fully by using numbers, separating punctuation, and possibly an "AM" or "pm" marker. Any strings with words inside fall into the Textual category.

These tags do not attempt to resolve ambiguities according to the current locale or Tango Server settings. Ambiguous values are not accepted.

Dates are composed of three numbers separated by identical punctuation character sequences: "/", "//", ".", or "-". Times are specified by three numbers separated by identical punctuation characters: ":" or ".", with an optional am/pm (case insensitive) marker afterwards. If an am/pm marker is present, then a single space may separate it and the time numbers. Timestamps are created by writing a date, followed by white space, followed by a time. A time may never be specified first.

Textual Formats

A textual format is any date/time string that includes alphabetic characters. These words are assumed to be weekday and month names in a variety of different languages. Input text must use high-ASCII characters instead of HTML &#xxx; escapes to represent accented characters. The following languages that use the ISO-Latin-1 character coding set are supported:


! Note: The current implementation of the IS[DATE/TIME/ TIMESTAMP] tags only works with languages that use the ISO- Latin-1 character set.




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

docs@pervasive.com
Copyright © 1999, Pervasive Software. All rights reserved.