[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] parse date in php and mysql
- Subject: Re: [cobalt-developers] parse date in php and mysql
- From: "nick 76" <njd76@xxxxxxxxxxx>
- Date: Mon Apr 7 08:17:01 2003
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
Thank you this worked Perfect! I want to say thank you for helping me out
here.
This takes data from an array and parses out year, month, day
list( $year, $month, $day ) = split( '[/.-]', $results[2] );
$results[2] = "$day/$month/$year";
From: "Stephen Cooke" <s.cooke@xxxxxxxxx>
Reply-To: cobalt-developers@xxxxxxxxxxxxxxx
To: cobalt-developers@xxxxxxxxxxxxxxx
Subject: Re: [cobalt-developers] parse date in php and mysql
Date: Fri, 04 Apr 2003 08:46:29 +0100
>
> I need a little help if anyone knows php and mysql.
> I have a query that returns date in an array in the format yyyy-mm-dd. I
> need to change it to dd-mm-yyyy. Can anyone help?
>
> This is why the date is in
> <?= $results[2] ?>
>
You could try this:
list( $year, $month, $day ) = split( '[/.-]', $results[2] );
$results[2] = "$day/$month/$year";
--
Steve Cooke
Web Development Officer
Manchester Metropolitan University
Hollings Campus
Old Hall Lane, Manchester
M14 6HR
_______________________________________________
cobalt-developers mailing list
cobalt-developers@xxxxxxxxxxxxxxx
http://list.cobalt.com/mailman/listinfo/cobalt-developers
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail