mithin wrote:
Hi,

I want to find if the difference between the days of two dates is less than
or greater than some number. The year is not in the picture and it can be
anything. I gave the following query but it is not working.

SELECT * FROM date_details WHERE (date(date_details.value,%j) -
date('now',%j) < 30)

Can someone pls help me?
Thanks a lot.
Try this:

SELECT * FROM date_details WHERE abs(strftime(date_details.value,'%j') - strftime('now','%j')) < 30

HTH
Dennis Cote

Reply via email to