You are here: FormatDateTime Revisited « PHP Programming Language « IT news, forums, messages
FormatDateTime Revisited

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация