CHAPTER 5 Moving Data In and Out of Databases
211
On input, the case the format code is ignored.
On output, the case of the format code has the following effect:
•
Mixed case (for example, “Dd”) means do not pad with zeroes.
•
Same case (for example, “DD” or “dd” means do pad with zeroes.
For example, a time as 17:23:03.774 using the default time format, but as
17:23:3.774 using 'HH:NN:Ss.SSS'.
The next table shows examples of how date input data looks and how to specify
the format with the
DATE
conversion option. Following the table are general
rules for specifying dates.
Table 5-8: Sample DATE format options
•
The
DATE
specification must be in parentheses and enclosed in single or
double quotes.
•
Adaptive Server IQ stores only the numbers of the year, month, and day;
it does not store any other characters that might appear in the input data.
However, if the input data contains other characters, for example, slashes
(/), dashes (-), or blanks to separate the month, day, and year, the
DATE
format must show where those characters appear so they can be ignored.
mm or MM
Represents number of month. Always use leading zeros for
number of the month where appropriate, for example ’05’ for
May. If you omit the month from a
DATE
value, the day is
treated as a Julian date. If you enter only the month, for
example, ’03’, Adaptive Server IQ applies the default year and
day and converts it to ’1900-03-01’.
dd or DD
jjj or JJJ
Represents number of day. Default day is 01. Always use
leading zeros for number of day where appropriate, for example
’01’ for first day. J or j indicates a Julian day (1 to 365) of the
year.
Option
Meaning
Input Data
Format Specification
12/31/98
DATE
(’MM/DD/YY’)
12-31-98
DATE
(’MM-DD-YY’)
19981231
DATE
(’YYYYMMDD’)
12/98
DATE
(’MM/YY’)
1998/123
DATE
(’YYYY/JJJ’)
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 ...