Reply to Re: How to manipulate date?

Your name:

Reply:


Posted by Chuck Anderson on 12/08/05 21:13

Greg Scharlemann wrote:

>If I have a date that looks like: 2005-12-07 10:10:00
>
>How could I manipulate it in php to say "Dec, 07, 2005"?
>
>I can separate the string at the space, but don't know where to go from
>there....thanks for any suggestions.
>
Here's a method I've used (found it using Google a year or so ago):

$a = '2005-12-07';

$y = $a[0].$a[1].$a[2].$a[3];
$m = $a[5].$a[6];
$d = $a[8].$a[9];
$unixtimestamp = mktime(0, 0, 0, $m, $d, $y);

$display_date = date('F j, Y',$unixtimestamp)

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Integrity is obvious.
The lack of it is common.
*****************************

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация