zend_date has this method?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

zend_date has this method?

sina miandashti
hi

i a field in db called => ticket_starttime

i store the creation time of tickets with time(); to this field in db table

how can i print it like a actual date with zend_date?

for ex  time like this 1253212662  to  2009/09/22 or  1 days ago or
...   any formated date ?
--
________________
Sincerely
Sina Miandashti
MuSicBasE.ir & InvisionPower.ir Admin
Reply | Threaded
Open this post in threaded view
|

Re: zend_date has this method?

Thomas Weidner
Have you looked into the manual  and tried toString() ?

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

----- Original Message -----
From: "sina miandashti" <[hidden email]>
To: "Zend MVC" <[hidden email]>
Sent: Friday, September 18, 2009 7:26 PM
Subject: [fw-mvc] zend_date has this method?


> hi
>
> i a field in db called => ticket_starttime
>
> i store the creation time of tickets with time(); to this field in db
> table
>
> how can i print it like a actual date with zend_date?
>
> for ex  time like this 1253212662  to  2009/09/22 or  1 days ago or
> ...   any formated date ?
> --
> ________________
> Sincerely
> Sina Miandashti
> MuSicBasE.ir & InvisionPower.ir Admin

Reply | Threaded
Open this post in threaded view
|

Re: zend_date has this method?

Duo Zheng
In reply to this post by sina miandashti
$date = new Zend_Date($unixtimestamp, Zend_Date::TIMESTAMP);
print $date->get();

There are many examples and options in the manual. Hope the above gets  
you started

http://framework.zend.com/manual/en/zend.date.html

Regards,
Duo

On Sep 18, 2009, at 1:26 PM, sina miandashti wrote:

> hi
>
> i a field in db called => ticket_starttime
>
> i store the creation time of tickets with time(); to this field in  
> db table
>
> how can i print it like a actual date with zend_date?
>
> for ex  time like this 1253212662  to  2009/09/22 or  1 days ago or
> ...   any formated date ?
> --
> ________________
> Sincerely
> Sina Miandashti
> MuSicBasE.ir & InvisionPower.ir Admin
>

Reply | Threaded
Open this post in threaded view
|

Re: zend_date has this method?

sina miandashti
hi thanks

but ... i get the tickets from db by this code :
$tickets = $user->findDependentRowset('Tickets')->toArray();

how can i apply zend_date for each ticket  's =>  ticket_starttime   ?

--
________________
Sincerely
Sina Miandashti
MuSicBasE.ir & InvisionPower.ir Admin