Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual page 234

Table of Contents

Advertisement

Converting data on insertion
214
The length of the format string is the width of the input column. Table 5-7
describes the date formatting options. The following table describes the time
formatting options.
Table 5-9: Formatting times
Option
Meaning
hh
Represents hour. Hour is based on 24-hour clock. Always use
leading zeros for hour where appropriate, for example '01' for 1
HH
am. '00' is also valid value for hour of 12 am.
nn
Represents minute. Always use leading zeros for minute where
appropriate, for example '08' for 8 minutes.
ss[.ssssss]
Represents seconds and fraction of a second.
aa
Represents the a.m. or p.m designation.
pp
Represents the p.m designation only if needed. (This is
incompatible with Adaptive Server IQ releases prior to 12.0;
previously, pp was synonymous with aa.)
hh
Adaptive Server IQ assumes zero for minutes and seconds. For
example, if the
Server IQ converts it to '03:00:00.0000'.
hh:nn or hh:mm
Adaptive Server IQ assumes zero for seconds. For example, if the
time value you enter is '03:25', Adaptive Server IQ converts it to
'03:25:00.0000'.
The following table shows examples of how time input data may look and how
to specify the format for the
general rules for specifying times.
Table 5-10: DATETIME format options
Input Data
12/31/98 14:01:50
123198140150
14:01:50 12-31-98
12/31/98 14:01:12.456
12/31/98 14:01:.123456
12/31/98 02:01:50AM
12/31/98 02:01:50pm
Specification letters for time components must be in enclosed in
parentheses and single or double quotation marks.
value you enter is '03', Adaptive
DATETIME
option. Following this table are the
DATETIME
Format Specification
('MM/DD/YY hh:nn:ss')
DATETIME
('MMDDYYhhnnss')
DATETIME
('hh:mm:ss MM-DD-YY')
DATETIME
('MM/DD/YY hh:nn:sssssss')
DATETIME
('MM/DD/YY hh:mm:sssssss')
DATETIME
('MM/DD/YY hh:mm:ssaa')
DATETIME
('MM/DD/YY hh:mm:sspp')
DATETIME

Advertisement

Table of Contents
loading

Table of Contents