Re: Formating MySQL dates

From: Date: Tue, 13 Jun 2000 14:44:50 +0000
Subject: Re: Formating MySQL dates
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-1715@lists.php.net to get a copy of this message
Use the following example to accomplish what you want: $newsplit = explode("-",$job['Date']); $gooddate = date("n-j-Y",mktime(0,0,0,$newsplit[1],$newsplit[2],$newsplit[0])); Where $job is the record from your mysql table, 'Date' is the field name containing the date. This is adapted from the example off the help page on the web site. -- Stephen Comoletti Systems Administrator Delanet, Inc. http://www.delanet.com ph: (302) 326-5800 fax: (302) 326-5802 "Phillip S. Baker" wrote: > Hey Gents, > > How do I take the standard YYYY-MM-DD date entry in MySQl and format > it so information pulled from MySQL is displayed differently when > actually put on the web? > > Thanks > -- > > Phillip S. Baker > > phillip@wordsandimages.com > Words & Images, Inc. > 1535 Seabright Avenue, Suite 100, Santa Cruz, CA 95062 > Direct Line (831) 420-2641 / Fax (831) 458-0808 > > -- > 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 (#1715) next »