[GLLUG] Is there any sane reason to do this? (Database question.)
John Winters
john at sinodun.org.uk
Tue Oct 7 19:29:57 UTC 2014
On 07/10/14 20:23, James Courtier-Dutton wrote:
> On 7 October 2014 20:05, John Winters <john at sinodun.org.uk> wrote:
[snip]
>> Days,DateIdent
>> 2000-01-03 00:00:00.000,1
>> 2000-01-05 00:00:00.000,2
>> 2000-01-06 00:00:00.000,3
>> 2000-01-07 00:00:00.000,4
>> 2000-01-08 00:00:00.000,5
>> 2000-01-10 00:00:00.000,6
>> 2000-01-11 00:00:00.000,7
[snip]
> My advice would be to just leave the integers as they are, and work
> out a formula to do the conversion.
> For example:
> (integer + offset) * 86400 = unix epoch time.
Unfortunately, it's worse than that. I've only realised as I've been
phrasing this query, but look closely at the data I've quoted above.
That's really how it is!
I don't think any algorithm will cope with it.
Happily, I need only to *extract* the data - I don't need to keep using
it, so I can convert things to proper dates as I extract.
I was just wondering whether there was some kind of sound design pattern
behind this, or it was just a bit of a brain-fart.
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 551 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20141007/21854464/attachment.pgp>
More information about the GLLUG
mailing list