Ok, so I am able to convert my mktime results to the date format, but is there a way to convert the date in this formation 04/05/2004 (MM/DD/YYYY) back to the mktime format?
what I want to do is pull the mktime format that I have stored in the database, display it to the user in the date format, have the user be able to change it in the date format and then store it back as the mktime??
try exploding it $yourdate="04/05/2004 "; $datenow=explode("/",$yourdate); $year=$datenow[2]; $month=$datenow[0]; $day=$datenow[1]; $mktime=mktime(0,0,0,$day,$month,$year);
echo $mktime;
or simply use [man]strtotime[/man]
mktime(0,0,0,substr($dat,0,2),substr($dat,3,2),substr($dat,6,4)));