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



<@DATEDIFF>

Syntax

<@DATEDIFF DATE1=firstdate DATE2=seconddate [FORMAT=format]>

Description

Returns the number of days between the two dates specified.

For more information, see "<@ISDATE>, <@ISTIME>, <@ISTIMESTAMP>".

<@DATEDIFF> handles ODBC, ISO, some numeric formats, and textual formats.

If the date is entered incorrectly--wrong separators or wrong values for year, month or day--the tag returns "Invalid date!".

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

All formats assume the Gregorian calendar. All years must be greater than zero.

Example

<@DATEDIFF DATE1=1998-02-20 DATE2=1998-02-27>

This tag returns "7", the number of days between the two dates.

See Also

<@DAYS>
<@FORMAT>
Format Attribute
<@ISDATE>, <@ISTIME>, <@ISTIMESTAMP>



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



docs@pervasive.com

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