You are here: Php Date-Formatting Help « PHP Programming Language « IT news, forums, messages
Php Date-Formatting Help

Posted by johndcal on 09/29/93 11:36

Hello All,

I have a date value that I pull from a .csv file.
After reading the file and storing the values in an array the value of
the date could
be found in $array[1], for example.
=============================================================
while (($data = fgetcsv($handle,5000, ",")) !== FALSE) {
$mydate = $data[3]; // here is the array value that holds the date
}
=============================================================
The date will be in either m/d/yyyy or mm/dd/yyyy format.
Here is the problem. I need to display this date on the page
in "long" format - i.e. January 5, 2005 instead of 1/5/2005 or
01/05/2005.

I have tried to use the date() function, however I can only get the
formatting to work
with the current date and not with an 'existing' date.

date("d.m.Y", $mydate); // this does not work, I get a date from
1969...

Any advise would be greatly appreciated!

JC

 

Navigation:

[Reply to this 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

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