vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |