EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Page 324

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...
Function types
306
"YMD function" on page 376
Date parts
Many of the date functions use dates built from date parts. The following
table displays allowed values of date-parts.
Date Part Abbreviation Values
Year yy 1753 – 9999
Quarter qq 1 - 4
Month mm 1 - 12
Week wk 1 - 54
Day dd 1 - 31
Dayofyear dy 1 - 366
Weekday dw 1 - 7 (Sun.-Sat.)
Hour hh 0 - 23
Minute mi 0 - 59
Second ss 0 - 59
Millisecond ms 0 – 999
Calyearofweek cyr Integer. The year in which the week begins.
The week containing the first few days of the
year can be part of the last week of the
previous year, depending on the weekday on
which the year started. Years starting on
Monday through Thursday have no days that
are part of the previous year, but years
starting on Friday through Sunday start their
first week on the first Monday of the year.
Calweekofyear cwk An integer from 1 to 54 representing the
week number within the year that contains
the specified date.
Caldayofweek cdw The day number within the week (Sunday =
1, Saturday = 7)
Java and SQL user-defined functions
There are two mechanisms for creating user-defined functions in Adaptive
Server Anywhere. You can use the SQL language to write the function, or
you can use Java.

Table of Contents

Related product manuals