MySQL Forums
Forum List  »  PHP

Re: How to compare dates ?
Posted by: Tapan Bhanot
Date: November 18, 2005 02:55AM

Hi,

For exmaple if arrival date is: 10-1-2005 then in db if there are 1000 different ranges are available then it should check with all 1000 ranges that 10-1 des not falls in the range or is not equal to any arrival or departure date in the db.

So means lets say if we have a date in db which says : 7-1-2005 to 17-1-2005 then its a clash with 10-1-2005 and should say: not available. And also if we have a date range in db like: 12-1-2005 to 22-1-2005 then it should also say not available becuase its still clashing with the date provided with user becuase his date is from 10 to 17 and 12,13,14,15,16 are between 12 to 22 so its a clash.

Only dates whcih do not clash at all or come in between each other are acceptable.

Do you get my point ?

Thanks.

Options: ReplyQuote


Subject
Written By
Posted
November 18, 2005 02:54AM
Re: How to compare dates ?
November 18, 2005 02:55AM
November 20, 2005 10:15AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.