tags:

views:

27

answers:

1

I have 3 dropdwons for day month and year. I was combining them till recently to save date_of_inspection in the db in mysql format. I was using the Day, month and year cakephp form helpers.This is what i was doing

$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'];

I removed the above line and still the date was being stored in mysql date format. How come ?? Does cakephp do it.

+1  A: 

In short, yes. Date and time "subarrays" are automatically deconstructed as part of the save process.

deceze
thanks i hope ur sure
Web Developer
@Web It works, doesn't it? ;-)
deceze