EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Page 344

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Alphabetical list of functions
326
expression The value to be converted to date format. The expression is
usually a string.
The following statement returns the value 1999-01-02 as a date.
SELECT DATE( ’1999-01-02 21:20:53’ )
SQL/92 Vendor extension.
Sybase Not supported by Adaptive Server Enterprise.
DATEADD function [Date and time]
Returns the date produced by adding a number of the date parts to a date.
DATEADD (
date-part
,
numeric-expression
,
date-expression
)
date-part The date-part to be added to the date..
$ For a complete listing of allowed date-parts, see "Date parts" on
page 306.
numeric-expression The number of date-parts to be added to the date.
The numeric_expression can be any numeric type; the value is truncated to
an integer.
date-expression The date to be modified.
The following statement returns the value:
1995-11-02 00:00:00.000.
SELECT dateadd( month, 102, ’1987/05/02’ )
SQL/92 Vendor extension.
Sybase Compatible with Adaptive Server Enterprise.
DATEDIFF function [Date and time]
Returns the interval between two dates.
DATEDIFF (
date-part
,
date-expression1
,
date-expression2
)
date-part Specifies the date-part in which the interval is to be measured.
$ For a complete listing of allowed date-parts, see "Date parts" on
page 306.
Parameters
Examples
Standards and
compatibility
Function
Syntax
Parameters
Examples
Standards and
compatibility
Function
Syntax
Parameters

Table of Contents

Related product manuals