1

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.

1 Answer 1

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.