Re: Easiest way to convert date?

From: Date: Thu, 24 Oct 2002 00:41:49 +0000
Subject: Re: Easiest way to convert date?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-121182@lists.php.net to get a copy of this message
So don't use * in your select ----- Original Message ----- From: "Megalion" <php@megandodson.com> To: <php-general@lists.php.net> Sent: Wednesday, October 23, 2002 5:59 PM Subject: Re: [PHP] Easiest way to convert date? Yes but that doesn't always work for all of us. It doesn't work when you're doing a "SELECT * FROM database"; I just write a function that'll convert the DATETIME field into the desired date format I want and then call it whenever i go to display the date. In the function, I just did it the dirty way which was to use substr to break up the date and put it together the way I wanted but YMMV Megalion The following message was sent by "Rick Emery" <remery@emeryloftus.com> on Wed, 23 Oct 2002 17:05:06 -0500. > Are you getting the date from MySQL? If so, let mysql handle the conversion > ----- Original Message ----- > From: "Jeff Lewis" <jeff@hyrum.net> > To: <php-general@lists.php.net> > Sent: Wednesday, October 23, 2002 4:47 PM > Subject: [PHP] Easiest way to convert date? > > > Is the easiest way to change this: > > 2002-10-18 12:41:20: > > into this: > > October 18th, 2002: > > by changing it into a timestamp and then using strftime? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#121182) next »