Subject | Format of ISC_TIME |
---|---|
Author | Michael.Straub@bellhowell.com |
Post date | 2003-01-22T19:53:38Z |
I have been playing with the ISC_TIME as part of time stamps and time
fields. The IB documentation (Langref.pdf) states that ISC_TIME, ISC_DATE,
and ISC_TIMESTAMP are all 64 bits. However ibase.h shows ISC_TIMESTAMP to be
a structure containind ISC_TIME and ISC_DATE. From my testing I am showing
the ISC_TIME and ISC_DATE to be 32 bits. Is the given size for ISC_TIME and
ISC_DATE a typo?
The ISC_TIME appears to be a value based on the number of tenths of
milliseconds from midnite. I adding a second to the struct tm and doing an
isc_encode_timestamp() call bumped the ISC_TIME value by 10,000 incrementing
the minute added 600,000 to the value and incrementing the hour added
36,000,000 to the value. Is my interpretation of the format correct?
I am trying to add milliseconds onto the timestamp value, but struct tm only
goes to seconds. Can I use the struct tm in the isc_encode_timestamp() and
then add the (milliseconds * 10) to the ISC_TIME portion of the timestamp to
load into the sqlvars? To reverse the procedure would I
isc_decode_timestamp() and then do a (ISC_TIME % 10000)/10 to get out the
milliseconds? This seems to work but I want to make sure my assumptions are
valid and this will continue to be supported in future versions.
thanks in advance,
Mike
[Non-text portions of this message have been removed]
fields. The IB documentation (Langref.pdf) states that ISC_TIME, ISC_DATE,
and ISC_TIMESTAMP are all 64 bits. However ibase.h shows ISC_TIMESTAMP to be
a structure containind ISC_TIME and ISC_DATE. From my testing I am showing
the ISC_TIME and ISC_DATE to be 32 bits. Is the given size for ISC_TIME and
ISC_DATE a typo?
The ISC_TIME appears to be a value based on the number of tenths of
milliseconds from midnite. I adding a second to the struct tm and doing an
isc_encode_timestamp() call bumped the ISC_TIME value by 10,000 incrementing
the minute added 600,000 to the value and incrementing the hour added
36,000,000 to the value. Is my interpretation of the format correct?
I am trying to add milliseconds onto the timestamp value, but struct tm only
goes to seconds. Can I use the struct tm in the isc_encode_timestamp() and
then add the (milliseconds * 10) to the ISC_TIME portion of the timestamp to
load into the sqlvars? To reverse the procedure would I
isc_decode_timestamp() and then do a (ISC_TIME % 10000)/10 to get out the
milliseconds? This seems to work but I want to make sure my assumptions are
valid and this will continue to be supported in future versions.
thanks in advance,
Mike
[Non-text portions of this message have been removed]