Posted by John K on 09/25/11 11:37
I posted on this a week or so ago and found a resolution in that
instance by using DATE_FORMAT in my sql string to display the format I
was looking for. This time I need to format the date going "into" the
database. In ASP/VBScript I just use "FormatDateTime" to convert the
users input into a palatable MySQL "date" datatype.
Here's what I need...
The user inputs a date by selecting dropboxes for "month", "day", and
"year". I did this to put them together.
$dateMerge = $_POST['year'] . "-" . $_POST['month'] . "-" .
$_POST['day'] ;
$timeMerge = $_POST['Time_Hour'] . ":" . $_POST['Time_Minute'] .
$_POST['Time_AMPM'];
Again, in ASP I would just format the input using "FormatDateTime" and
that's it. How do I achieve this in PHP. PHP is "very" new to me and
I'm a little thrown by the differences.
Thanks!
Navigation:
[Reply to this message]
|