Re: Fw: [PHP-GTK] Date format error in CLi st
| From: | PQ Administrator | Date: | Wed, 24 Oct 2001 05:42:25 +0000 |
| Subject: | Re: Fw: [PHP-GTK] Date format error in CLi st | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-414@lists.php.net to get a copy of this message | ||
LMAO.... heh, I need some sleep to, been up for almost 30 some odd hours w/o sleep.
Hey, i got to figure that date formatting issue b4 you sent this...
I just converted the date fields in mysql to "date" type
Then i parsed them out using:
list($year, $month, $day) = explode("-", $datefield);
$newdatefield = "$month/$day/$year";
or whatever format i want ;)
Works good,
Thanks for the help!
-----Original message-----
From: "Steph" <Steph.Fox@btinternet.com>
To: "PQ Administrator" <pqadmin@physicianquest.net>
Date: 10/23/2001(Tue)20:22
Subject: Fw: [PHP-GTK] Date format error in CList
'Course I could be talking complete rubbish here, it's months since I looked at that
script and it's now after 5am
;)
Tell ya what, I'll go to sleep!
----- Original Message -----
From: "Steph"
To: "PQ Administrator" ; "PHP-GTK"
Sent: Wednesday, October 24, 2001 5:18 AM
Subject: Re: [PHP-GTK] Date format error in CList
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"
To: "PHP-GTK"
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
--
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
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