Reputation: 2649
I am converting date-time value into int datatype in MySQL database.my question is when i updating that value in zend form it display same integer value in my text box.How can i convert that int value into date time format when i display that value in update form.
Upvotes: 1
Views: 146
Reputation: 21937
If your INT - is a Unix time stamp, use the following code:
$timestamp = 1349079306;
$date = new Zend_Date($timestamp);
echo $date->get(Zend_Date::ATOM); // all constants here : http://framework.zend.com/manual/1.12/en/zend.date.constants.html
Upvotes: 1