It is a very common algorithm. From memory it is implemenented in Sqlite, for example.

[EMAIL PROTECTED] wrote:
can convert to seconds since start of epoch, do the arithmetic,
then convert back


Don't get you. It would be quite a calculation, with leap years etc.

RBS


On Sun, Dec 03, 2006 at 05:31:55PM +0000, RB Smissaert wrote:

Still have the problem though how to compare dates in SQLite when the
format
is the integer yyyymmdd. Maybe I will need some custom SQLite function.

What's difficult about comparing integers of the form yyyymmdd?

Comparing them is easy: normal integer comparison operators work just
fine.

Date arithmetic with yyyymmdd integers, OTOH, is more difficult; but you
can convert to seconds since start of epoch, do the arithmetic, then
convert back.

Nico
--

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------








-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to