Re: Date Problem
| From: | mustafa ocak | Date: | Mon, 21 Apr 2003 13:02:13 +0000 |
| Subject: | Re: Date Problem | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27222@lists.php.net to get a copy of this message | ||
Date values can be queried like numeric values
select * from table_name
where
'2003-04-21' between Booking_Start_Date and Booking_End_Date;
or you can write the statement like that :
select * from table_name
where
'2003-04-21' >= Booking_Start_Date and '2003-04-21' <=Booking_End_Date;
HTH
Mustafa OCAK
PHP Developer
Ankara, Turkey
----- Original Message -----
From: "shaun" <shaun@mania.plus.com>
To: <php-db@lists.php.net>
Sent: Monday, April 21, 2003 3:47 PM
Subject: Re: [PHP-DB] Date Problem
> "Jason Wong" <php-db@gremlins.biz> wrote in message
> news:200304211711.46147.php-db@gremlins.biz...
> > On Monday 21 April 2003 17:06, shaun wrote:
> >
> > > I have two columns in my table in date format: Booking_Start_Date and
> > > Booking_End_Date.
> > >
> > > Is it possible to query the database to find out if a given date is
> between
> > > either of these dates?
> >
> > Yes, archives > between date
> >
> > --
> > Jason Wong -> Gremlins Associates -> www.gremlins.biz
> > Open Source Software Systems Integrators
> > * Web Design & Hosting * Internet & Intranet Applications Development *
> > ------------------------------------------
> > Search the list archives before you post
> > http://marc.theaimsgroup.com/?l=php-db
> > ------------------------------------------
> > /*
> > All the simple programs have been written.
> > */
> >
>
> Thanks for your reply but i cant find any reference to this particular
> problem in the archives...
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php