need help with dates

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have setup my database with a field set to timestamp.  I would like to be  
able to query against this date in a search but would probably use only a  
date.  IE. timestamp 2006-11-01 13:25:01 and I would want to query for  
11-01-2006.  Hopefully that makes sense.  I don't know really where to begin  
with this one.  Does anyone have any great tutorial on working with  
timestamp?  I appreciate any help you may be able to give.


Re: need help with dates

Quoted text here. Click to load it

Not sure that you need a big tutorial ;-) What you need to do is just
use a query that is similar to the following:
SELECT * FROM table WHERE my_timestamp > '2006-11-01' AND my_timestamp
< '2006-11-02'
this query will return you all records for 2006-11-01.

Alexander - PHP/ZendFramework/Ajax blog

Site Timeline