Posted by AlexVN on 11/01/06 21:44
On Nov 1, 11:20 pm, "Auddog" <wil...@hotmail.com> wrote:
> 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.
>
> A
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.
Sincerely,
Alexander
http://www.alexatnet.com/ - PHP/ZendFramework/Ajax blog
Navigation:
[Reply to this message]
|