Re: Date format

From: Date: Mon, 07 Apr 2003 19:28:56 +0000
Subject: Re: Date format
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-142740@lists.php.net to get a copy of this message
Here is what I do: I have a date passed to me from another page as "work_week", in the format yyyy-mm-dd. I convert it to dd-mm-yyyy with the lines below. The - in the quotes referes to what is used to seperate the numbers. $work_week=($_POST['work_week']); list($year, $month, $day) = explode("-", $work_week, 3); $monday = "$month-$day-$year"; "Mark A Bomgardner" <mbomgardner@kletc.org> wrote in message news:6B313BECC1DA1A4A959DB3256FB0125F120DC7@skylark2.home.ku.edu... > List people: > > I aploogize if this issue has been resolved in the past, but I am new to php > and I could find an answer in the archives. > > Problem: > > I have a form that a user inputs a date (mm/dd/yyyy) and I want to convert > that to the mysql date yyyy-mm-dd so it can be inputed in to the database. > > I have tried the date() command with no luck and I am out of options to try. > > > I can get the date out of mysql once it gets there, but putting it into the > correct format has been a problem. > > Any help would be greatly appreaciated. > > > Mark Bomgardner > ex-lasso person > new php person

« previous php.general (#142740) next »