Revision: 18304
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 28, 2009 04:19 by daveismyname
Initial Code
//date from a form in the format of dd/mm/yyyy $date_array = explode("/",$date); // split the array $var_day = $date_array[0];//day seqment $var_month = $date_array[1];//month segment $var_year = $date_array[2];//year segment $departure = "$var_year-$var_day-$var_month";//join them all together to input into a mysql table
Initial URL
Initial Description
This snippet collects a date from a var and formats it into the correct format for database date entry
Initial Title
Date format for mysql input
Initial Tags
mysql, date, format
Initial Language
PHP