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
The following table shows examples of how time input data may look and how
to specify the format for the
DATETIME
option. Following this table are the
general rules for specifying times.
Table 5-10: DATETIME format options
•
Specification letters for time components must be in enclosed in
parentheses and single or double quotation marks.
Option
Meaning
hh
HH
Represents hour. Hour is based on 24-hour clock. Always use
leading zeros for hour where appropriate, for example ’01’ for 1
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
DATETIME
value you enter is ’03’, Adaptive
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’.
Input Data
Format Specification
12/31/98 14:01:50
DATETIME
(’MM/DD/YY hh:nn:ss’)
123198140150
DATETIME
(’MMDDYYhhnnss’)
14:01:50 12-31-98
DATETIME
(’hh:mm:ss MM-DD-YY’)
12/31/98 14:01:12.456
DATETIME
(’MM/DD/YY hh:nn:sssssss’)
12/31/98 14:01:.123456
DATETIME
(’MM/DD/YY hh:mm:sssssss’)
12/31/98 02:01:50AM
DATETIME
(’MM/DD/YY hh:mm:ssaa’)
12/31/98 02:01:50pm
DATETIME
(’MM/DD/YY hh:mm:sspp’)
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...