RE: [PHP] dates from db

From: Date: Wed, 07 Mar 2001 14:08:28 +0000
Subject: RE: [PHP] dates from db
Groups: php.general 
Request: Send a blank email to php-general+get-42900@lists.php.net to get a copy of this message
> -----Original Message----- > From: Matt Davis [mailto:matt@roundyourway.co.uk] > Sent: Wednesday, March 07, 2001 7:35 AM > To: Php Mailing List > Subject: [PHP] dates from db > > > I am calling on a number of fields from my db one of which is > a date. When the date displays it is in the following format > > YYYY-MM-DD 00:00:00 > > I Want it to only display the date and not the time like this > > YYYY-MM-DD > > Is it possible to remove the time when calling on it from the db Check the documentation for the database engine you're using. MySQL, for example, has a date_format() function that you can use in your query to specify what information you'd like displayed from a date/time field, and how you'd like it presented. --- Mark Roedel (roedelm@letu.edu) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University || -- Henry Kissinger

« previous php.general (#42900) next »