[thelist] PHP/MySQL Date Format Help

Dan Romanchik dan at danromanchik.com
Wed Aug 4 09:26:07 CDT 2004


How about using the PHP date() function?

Dan
--------------------------------------------------------------------
Dan Romanchik - Web Developer
dan at danromanchik.com, 734-930-6564


----- Original Message -----
From: "Rob Smith" <rob.smith at THERMON.com>
To: "Thelist (E-mail)" <thelist at lists.evolt.org>
Sent: Wednesday, August 04, 2004 9:28 AM
Subject: [thelist] PHP/MySQL Date Format Help


> Hi,
>
> I had a problem last night that I thought you could help me with. If
you've
> ever worked with php/mysql and the date format, you've probably seen the
> format like YYYY-MM-DD.
>
> In this particular case, my date is 2004-08-01 (Last Sunday) that was
> entered by the "admin" for the purposes of placing into the mySQL database
> accurately.
>
> I want to transform this date into a "readable" format for the end user.
> That this is ultimately going to go to. When I try to spit this back out
> through PHP by date formatting it " . date("M d y", $_POST["orderdate"]) .
> ", It always returns the day before the day Delphi Time began, 1/1/1970,
> which is Dec 31 1969.
>
> Can anyone offer a more cleaver way to reformat the YYYY-MM-DD into
> DD-MM-YYYY. Strangely enough I think I see the answer:
>
> $date = split("",$_POST["orderdate"]);
> $date = array_flip($date);
>
> Anything better?
>
> Rob Smith
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>




More information about the thelist mailing list