I noticed that Message-ID: <4Igpc.26291$5a.24525@okepread03> from Jeff
Rodriguez contained the following:
How do I convert a string into a value I can upload to mysql date field.
Specifically, I have a user select a month, day and year from
drop-downs, then I want them submitted to one date field. Thanks!
Steve.
You want to convert a string to a unix timestamp, then you can use the functions
in mysql to convert the timestamp to mysql native.
Why, when he can arrange the dropdown boxes to provide a suitable date?
Say the boxes return year month and day
function make_mysql_date($y,$m,$d){
$array = array($y,$m,$d);
$mysql_date = implode("/", $array);
return $mysql_date;
}
Not that I usually bother with MySql's date format these days. Mostly I
simply store a Unix timestamp.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs
http://www.ckdog.co.uk/rfdmaker/