Forum Moderators: coopster
..
What the thing is..people will be entering in claims and they like 8 char dates since its faster 10192002
but i cant save that in mysql cause it will save it as Feb 20th 1019. I need to explode it reorganize it and save it as 20021019. and im used to doing that with - or / and they dun want that...
$date = '10192002';
echo date [php.net]("Y-m-d", mktime [php.net](0, 0, 0, substr [php.net]($date,0,2), substr($date, 2, 2), substr($date, 4, 4)));
Offers a format for MySQL date columns...
2002-10-19
Hmmmm...rethinking that, why even go through the date/time functions; just substring it together...
echo substr($date, 4, 4), '-', substr($date,0,2), '-', substr($date, 2, 2));
You could also use checkdate [php.net] to verify the entry by the operator.