RE: Mysql Date got prob!
| From: | Uttam | Date: | Sat, 01 Mar 2003 08:15:53 +0000 |
| Subject: | RE: Mysql Date got prob! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-137674@lists.php.net to get a copy of this message | ||
try:
select
date_format(date_add(arrivaldate1, INTERVAL nights1 DAY), '%Y-%m-%d') as
dept_date1
from mytable
where
(date_add(arrivaldate1, INTERVAL nights1 DAY) BETWEEN '2003-02-01' AND
'2003-02-10')
regds,
-----Original Message-----
From: Dhaval Desai [mailto:da_linuxguru@hotmail.com]
Sent: Friday, February 28, 2003 15:48
To: php-general@lists.php.net
Subject: Mysql Date got prob!
Hello,
As related to my earlier question
select date_format(date_add(arrivaldate1, INTERVAL nights1 DAY), '%Y-
%m-%d') as dept_date1 from mytable where ('dept_date1' BETWEEN
'2003-02-01' AND '2003-02-10')
The above query is valid but returns 0 because 'dept_date1' is treated
as a
string. I want dept_date1 to be treated as date so that it can be
compared.
I hope it is possible...
Thank you!
-Dhaval
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail