Yii Framework Forum: Display INT timestamp from database as readable format in view - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Display INT timestamp from database as readable format in view How to display an INT timestamp value as a readable date time Rate Topic: -----

#1 User is offline   ooaat 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 89
  • Joined: 01-May 09

Posted 07 July 2010 - 10:33 PM

In my model I am using time() and as an integer to save the time and date...

How do I display this value on a page in a readable format?

So instead of 1278754137 being shown its an actual date and time
0

#2 User is offline   mech7 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 220
  • Joined: 26-March 09

Posted 07 July 2010 - 10:52 PM

http://th2.php.net/m...nction.date.php
0

#3 User is offline   ooaat 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 89
  • Joined: 01-May 09

Posted 07 July 2010 - 11:03 PM

View Postmech7, on 07 July 2010 - 10:52 PM, said:



thanks

I actually found it myself too

http://php.net/manua...nction.date.php
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users