检验日期
在数据库中以mysql格式。我使用的是日、月和年的cakephp表单帮手。这个我就是这么做的
$this->data['Cabinet']['date_of_inspection'] =
$this->data['Cabinet']['date_of_inspection']['year'].'-'.
$this->data['Cabinet']['date_of_inspection']['month'].'-'.
$this->data['Cabinet']['date_of_inspection']['day'];