Reputation: 1131
I'm working on a Zend Framework (v1.7) application that calls for a few forms that users need to enter dates on.
The user is prompted to enter dates in the dd/mm/yyyy format, but the MySQL database wants the dates to be presented in yyyy-mm-dd format. Therefore, i'm having to do the following:
Loading the form
Saving the form
There must be an easier way to do this :-S
Can anyone suggest one?
Cheers,
Matt
Upvotes: 0
Views: 989
Reputation: 75764
You can skip the reformatting if you use the according sql functions like DATE_FORMAT() and STR_TO_DATE() in MySql. The rest looks ok to me.
Upvotes: 2