Datefield And Date Format Problem

Hi guys, it is my first post, so hello! :)

I am wirting an application now, and i am in this stage, when i need to get date from user by form. I used built-in solution provided by Yii, as in topic: dateField.

Default it gather date and provide it in yyyy-mm-dd format. My question is how can i convert this date to unix timestamp, and how should i provide the data to the form, when user is editing it (convert from unix timestamp to yyyy-mm-dd)?

Why i need to do that? Hm, i just took convention like that, and i am storing all by time/date as unix timestaps.

PS. Sorry for my English.

That’s a general PHP question. Plz read php manual about existing date/time functions.

Also:

http://www.yiiframework.com/search/?q=timestamp&type=forum

http://www.yiiframework.com/forum/index.php/topic/48931-handling-datetimes-in-activerecord/page__p__228402__fromsearch__1#entry228402