var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: queries of dates
I want to run queries on entries with certain dates....
I want the query to come up with entries which are bigger than 02/09/1982
I'm assuming I do:
SELECT * FROM ME WHERE ME.DATE<DATE()
(i tried this in msaccess -didn't work )
Now, how do i do a query that will result in all entries that their DATE filed is between now and the past 60 days?
you'll need to be a bit more specific
do you want dates greater than 02/09/1982, or dates between now and the past 60 days?
also, what database do you want this for, mysql or access?
And i want to know how to do both...
I think for the first one "anything above 02/09/1982" I need
SELECT * FROM ME WHERE ME.DATE>'02/09/1982'
Then i need one that would do the past 60 days....
Do can i subtract NOW() - 60????
Would that work?
1. mysql recognizes dates only in year/month/day sequence
... WHERE ME.DATE > '1982-02-09'
2. perform the calculation on CURRENT_DATE
... WHERE ME.DATE > DATE_SUB(CURRENT_DATE, INTERVAL 60 DAY)