RE: [PHP] Date Question.
| From: | Don Read | Date: | Wed, 05 Mar 2003 19:48:44 +0000 |
| Subject: | RE: [PHP] Date Question. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138350@lists.php.net to get a copy of this message | ||
On 05-Mar-2003 Sebastian wrote:
> I have a date field in mysql in this format: Y-m-d H:i:s
>
> I would like to echo "Today" if the date is today, can someone offer some
> help? Thanks.
>
SELECT IF(TO_DAYS(datefld)=TO_DAYS(current_date),'Today',LEFT(datefld,10)) as
datefld, ...
Regards,
--
Don Read dread@texas.net
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.