Re: Formatting date from a database date value

From: Date: Thu, 27 Jul 2000 18:54:56 +0000
Subject: Re: Formatting date from a database date value
Groups: php.general 
Request: Send a blank email to php-general+get-8635@lists.php.net to get a copy of this message
You can do a regular expression to get rid of the dashes and then do strtodate(); You can do a mktime() then a date() Or you can do it in mysql using date_format in your sql query. All PHP functions should be in the php manual, and the mysql function should be in the mysql function. Hope this helps. Jason Stechschulte jpstech@nc.edu -----Original Message----- From: Jack Sasportas [mailto:jack@innovativeinternet.com] Sent: Thursday, July 27, 2000 2:17 PM To: php Subject: [PHP] Formatting date from a database date value I have searched in the manual and a couple of sites not finding what I am looking for. When I use this command echo mysql_result($result,$i,received_date); the result is 2000-04-27, and what I want it to look like is 04-27-00. I had a couple of suggestions that didn't work, we are reading this from mysql just in case that's a factor. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#8635) next »