Thanks to Dennis Cote I got a nice way to get the age from the date in the
form 'yyyy-nmm-dd'. It works fine when I run it on a field, but when I run
it on a literal date it gives me 100 too much:

select
case when 
date('2002-01-01', '+' || (strftime('%Y', 'now') - 
strftime('%Y', '2002-01-01')) || ' years') <= date('now') 
then 
strftime('%Y', 'now') - strftime('%Y', '2002-01-01') 
else
strftime('%Y', 'now') - strftime('%Y', '2002-01-01') - 1 
end

Why is this?

RBS



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

Reply via email to