Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Tam O'Shanter found an event_time column stored as a smallint with values like 895 and 465 and asked how to decode it. Obnoxio The Clown guessed seconds since midnight. Carsten Haese said both values are below 1440, so minutes since midnight is the likely meaning, and that seconds would overflow a smallint. Captain Pedantic corrected a typo. Not confirmed.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Tam O'Shanter — — source: Usenet: comp.databases.informix
Hello,
I have an application reading an Informix table with a column of
'event_time' stored as a smallint.
This is causing me some grief as I am seeing time like '895' or '465'.
Not seen this method of storing time data before, is this commonplace?
Thoughts on how to decode this data into meaningful times?
Any and all help is always welcome.
Thanks,
T.
Tam O'Shanter said:
> Hello,
> I have an application reading an Informix table with a column of
> 'event_time' stored as a smallint.
>
> This is causing me some grief as I am seeing time like '895' or '465'.
>
> Not seen this method of storing time data before, is this commonplace?
>
> Thoughts on how to decode this data into meaningful times?
Number of seconds since midnight?
--
Bye now,
Obnoxio
"I'm astonished anyone pays real money for this crap."
-- Cosmo
--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.
On Mon, 2007-05-14 at 12:23 +0000, Tam O'Shanter wrote:
> Hello,
> I have an application reading an Informix table with a column of
> 'event_time' stored as a smallint.
>
> This is causing me some grief as I am seeing time like '895' or '465'.
>
> Not seen this method of storing time data before, is this commonplace?
No, this shouldn't be commonplace, since Informix has a DATETIME type.
> Thoughts on how to decode this data into meaningful times?
If you can't divine what the existing application does, educated
guessing might help. There are 1440 minutes in a day, which translates
to 86400 seconds in a day. Both examples are less than 1440, and 86400
exceeds the maximum that a smallint can't contain, so I'm guessing the
time is stored as "minutes since midnight".
Hope this helps,
--
Carsten Haese
http://informixdb.sourceforge.net
"Carsten Haese" <carsten@uniqsys.com> wrote in message
news:mailman.661.1179146109.10648.informix-list@iiug.org...
> Both examples are less than 1440, and 86400 exceeds the maximum that a
> smallint can't contain ...
Er, this is an oxymoron. There isn't a maximum value that something *can't*
contain.
On Mon, 2007-05-14 at 19:13 +0100, Captain Pedantic wrote:
> "Carsten Haese" <carsten@uniqsys.com> wrote in message
> news:mailman.661.1179146109.10648.informix-list@iiug.org...
>
> > Both examples are less than 1440, and 86400 exceeds the maximum that a
> > smallint can't contain ...
>
> Er, this is an oxymoron. There isn't a maximum value that something *can't*
> contain.
Right, I meant "can." I noticed the typo seconds after posting and
didn't think it was necessary to post a correction. Guess I was wrong.
--
Carsten Haese
http://informixdb.sourceforge.net
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.