FormatDateTime Revisited



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!

.



Relevant Pages

  • Re: [PHP] How to fetch .DOC or .DOCX file in php
    ... [PHP] How to fetch .DOC or .DOCX file in php ... I want to fetch text from .doc / .docx file and save it into database ... I am working on a set of php classes that will be able to read the text with the formatting included and convert it to a standard document format. ...
    (php.general)
  • Re: Ruby performance woes
    ... With PHP, I needed to set up a .HTACCESS file which enabled PHP on ... to convert either syntax to fully HTML output) ... into and out of a scriptlet to mix output generated by scriptlets ... within a single huge format string within a single call to FORMAT, ...
    (comp.lang.lisp)
  • Re: [PHP] How to fetch .DOC or .DOCX file in php
    ... [PHP] How to fetch .DOC or .DOCX file in php ... I want to fetch text from .doc / .docx file and save it into database ... I am working on a set of php classes that will be able to read the text with the formatting included and convert it to a standard document format. ...
    (php.general)
  • Re: posting hidden form data to a popup window
    ... On my formatted PHP page, I'm set up to get vlues in this format; ... What I need to see is both how I can send the hidden values, and how do I display them on the PHP popup page. ... Is there some way to make sure that the popup is fully opened before I start having it get the hidden values.? ... var iMyHeight; ...
    (comp.lang.javascript)
  • RE: [PHP] PHP form to fax?
    ... Does anyone use this service with PHP and would it be ... possible to see some sample code on how you format the ... email/message to their server? ... > to the your jfax ...
    (php.general)