If you think carefully you'll conclude that
there is only one type of TIMESTAMP: day,
month, year, hours, minutes, seconds and 1/1e6
of seconds. All other types are derived from
this format, the complete TIMESTAMP format.
This is theory. In practice, each DB engine stores this information in
a different format (or several formats, as in the case of DB2), and
even worse, returns it in yet another format.
I(we?) was talking about DB2. Several formats?
You're right. But the complete information(that
can be represented in several formats) MUST have
the fields I explained above, at least.
To offer the pascal programmer a UNIFORM interface, which is the same
across all DB engines, all dates are represented as a TDateTime value.
I understand this. But, if each RDBMS has its own
format I think that a little flexibility is welcome.
Regardless of the internal format of TDateTime, using a text value
is definitely out, because then you will be stuck with different
date notations. Not to mention that it takes more memory to store
it as text, and this is also bad.
The different notations use, all of the fields
above, in different orders. Or no? You may
customize the ODBC(IBM DB2 ODBC has formats ISO,
EUROPE, USA...) to attend these different
formats. I only suggest one format. You may
change order of the fields as the users request.
One or two bytes more to give clarity... If you
consider the size of memories available...(I
remember a conversation about prologs and epilogs, somedays ago :-X )
[ ]
Arí
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives