Re: Displaying Date from Value in MySQL DB

From: Date: Tue, 20 Apr 2004 19:55:23 +0000
Subject: Re: Displaying Date from Value in MySQL DB
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-33985@lists.php.net to get a copy of this message
From: "Justin @ Dreaming in TO" <justin@dreaminginto.com> > SELECT ditoevents.eventstatus, ditoevents.eventdate, > DATE_FORMAT(ditoevents.eventdate, '%a, %b %d %Y'), ditoevents.eventtime, > ditoevents.eventlocation, ditoevents.topic, ditoevents.presenter > FROM ditoevents > WHERE ditoevents.eventstatus = 'next' Use an alias: SELECT ditoevents.eventstatus, ditoevents.eventdate, DATE_FORMAT(ditoevents.eventdate, '%a, %b %d %Y') AS myformatteddate, ditoevents.eventtime, ditoevents.eventlocation, ditoevents.topic, ditoevents.presenter FROM ditoevents WHERE ditoevents.eventstatus = 'next' Then display $row['myformatteddate'] when you're displaying the data. ---John Holmes...

« previous php.db (#33985) next »