How to Compare and fetch date in Cakephp ?

Posted by delete me on Stack Overflow See other posts from Stack Overflow or by delete me
Published on 2010-02-20T14:42:00Z Indexed on 2010/03/16 6:06 UTC
Read the original article Hit count: 189

Filed under:
|
|
|
|

I am trying to make an availability calender and need to know how can I compare date when fetching it.

My DB is

id
start_date
end_date
status

Now suppose I want to fetch booking in next month, i.e. from 2010-03-01 to 2010-04-01. How should I fetch this data ? I did try comparing directly using an and condition but it didnt help.

The format in DB is yyyy-mm-dd and I used the same to compare. But direct comparison does not work.

© Stack Overflow or respective owner

Related posts about cakephp

Related posts about date