I am looking for a way to convert dates from number format into an American format date. I am working with a database that stores dates in number format (ie today is '144'). Does anyone know how to convert these dates into American format (05/24/2002)? Any help would be greatly appreciated. Thank you in advance. Perumati
You can use a timestamp:
$date = mktime(0, 0, 0, date("m"), date("d"), date("Y")); echo date("m/d/Y", $date);
and store the time stamp in the database
I suspect 144 means the 144th day of the year. As for what year it is, perhaps this is stored in another field. Converting it shouldn\'t be too difficult. It may be a matter of subtracting the number of days in January, Febuary and so on until the number of days in the month your checking is larger than the remaining ... anyway, i think you get the idea.