Re: Date format error in CList

From: Date: Wed, 24 Oct 2001 04:18:21 +0000
Subject: Re: Date format error in CList
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-413@lists.php.net to get a copy of this message
Last time I hit this problem I ended up converting input date to unix, storing in the db as unix, then using date formatting on the retrieved info. current date going in: $date = date('H, i, s, m, d, Y'); $date2 = mktime($date); stored date coming out: while ($a = mysql_fetch_array($result)) { $newdate = date("j M Y", $a[date]); } ----- Original Message ----- From: "PQ Administrator" <pqadmin@physicianquest.net> To: "PHP-GTK" <php-gtk-general@lists.php.net> Sent: Wednesday, October 24, 2001 5:12 AM Subject: [PHP-GTK] Date format error in CList > > Im trying to format date as Y-m-d in a Clist, date_format didnt work with sql so I do my query > and then *try* to fix the date as follows: > > $bdate= $row["mynewdate"]; > > $return[] .= date("Y m d", $bdate); > > It returns all dates as: 1969-12-31 > > Any ideas?? > > TIA > Troy McComas > Networks/System Admin. & Developer > PhysicianQuest.com > admin@physicianquest.com > Office - (818)550-8777 or (626)282-0288 > Cell- (626)255-9833 > <!-- --> > Powered by PhysicianQuest.com > > -------------------------------------------------------------------------------- > -- > PHP-GTK General Mailing List (http://gtk.php.net/) > To unsubscribe, e-mail: php-gtk-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-gtk-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.gtk.general (#413) next »