Monday, 26 August 2013

Including the day of the week in a MySQL table

Including the day of the week in a MySQL table

How would I go about changing the way a 'sign up' date is displayed in a
MySQL table? I wanted the date to be formatted in this way: Monday, August
26 2013 6:04PM instead of the usual, standard format based on a 24 hour
clock.
Currently I have
$value = mysql_real_escape_string($_POST['First']);
$value2 = mysql_real_escape_string($_POST['Last']);
$value3 = mysql_real_escape_string($_POST['City']);
$value4 = mysql_real_escape_string($_POST['State']);
$value5 = mysql_real_escape_string($_POST['Country']);
$value6 = mysql_real_escape_string($_POST['Email']);
$sql = "INSERT INTO members (First, Last, City, State, Country, Email,
Date)
VALUES('$value','$value2','$value3','$value4','$value5','$value6',NOW())";

No comments:

Post a Comment