Gossamer Forum
Home : Products : DBMan SQL : Discussion :

by Date Search.

Quote Reply
by Date Search.
I have only one DATE field in my database and it's the date of addition of record.
How I am supposed to search records FROM & TO dates? Like the records added between 2005-01-30 & 2005-02-06?

Anything I can do in templates or subs to achieve it?

############### SQL QUERY ################
SELECT .. FROM .. WHERE datefield > "2004-03-22" AND datefield < "2004-10-30";
#######################################

Thanks,
Sara.
Quote Reply
Re: [samsara] by Date Search. In reply to
You can use the url below:

db.cgi?db=table;do=search_results;datefield-ge=2005-01-30;datefield-le=2005-02-06

or it can be done in search form. You can also use datefield-gt and datefield-lt instead.

TheStone.


B.