in reply to Subtracting certain number of days from current date.
If you are working in database then you could use some kind of built-in function in your query (few people said it would be faster) -- never done the benchmarking myself.
For example in mysql you can do it this way.
SELECT *,DATEDIFF(NOW(),`YourDateField`) AS `DiffDate` FROM `table` WH +ERE `x` = 'y' this will return an additional column for every row containing the dat +e difference between the current date and the date stored in the data +base.
|
|---|