EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Page 200

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 options
182
The format is a string using the following symbols:
Symbol Description
yy Two digit year
yyyy Four digit year
mm Two digit month, or two digit minutes if following a colon(as in
hh:mm)
mmm[m...] Character short form for months—as many characters as there are
m's
d Single digit day of week, (0 = Sunday, 6 = Saturday)
dd Two digit day of month
ddd[d...] Character short form for day of the week
hh Two digit hours
nn Two digit minutes
ss[.ss..] Seconds and parts of a second
aa AM or PM (12 hour clock)
pp PM if needed (12 hour clock)
jjj Day of the year, from 1 to 366
Each symbol is substituted with the appropriate data for the date that’s being
formatted. Any format symbol that represents character rather than digit
output can be put in upper case which causes the substituted characters to
also be in upper case. For numbers, using mixed case in the format string
suppresses leading zeros.
You can control the padding of numbers by changing the case of the
symbols. Same-case symbols (MM, mm, DD, dd) all pad number with
zeroes. Mixed case (Mm, mM, Dd, or dD) cause the number to not be zero
padded: the value takes as much room as required. For example
SELECT dateformat( ’1998/01/01’, ’yyyy/Mm/Dd’)
returns the following value:
1998/1/1
The following table illustrates DATE_FORMAT settings, together with
the output from the following statement, executed on Thursday May 21,
1998
SELECT CURRENT DATE
Description
Examples

Table of Contents

Related product manuals