Hi
I want to select data from table when the date field is between 2 special days
how should I write the where statement?
days between
Moderator: General Moderators
Code: Select all
WHERE `date_field` BETWEEN '2007-07-01' AND '2007-07-30'- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Hehe, quite an observation. I do notice the name coming up more often than it should. :-pmiro_igov wrote:This is if yuor date_field is in DATE format, if DATETIME you should add the time too. But from your posts looks like you don't try to read manuals.Code: Select all
WHERE `date_field` BETWEEN '2007-07-01' AND '2007-07-30'
It's good i thinks.superdezign wrote: Hehe, quite an observation. I do notice the name coming up more often than it should. :-p
because it means i hope to get support in DN.
posting.php?mode=reply&t=71231
but that basically because I don't know to search for what in manuals or i don't understand them. for example, someone said I may need to use date function and I looked the manual (php.net) but did not understand it.
even when I search for a function or tutorial, explanations from other sites are more understandble for me.
anyways, you have been good teachers for me. thanks