Related / Friend Blogs
Top Poster
#1 ramon fincken 93
#2 Site admin 2
#3 Jan 0
[snipplet] Function convert unix PHP time to a normal date



Rating : 3 / 5

Tags:

 
Post new topic   Reply to topic    Ramonfincken.com Forum Index -> PHP coding
:: View next topic  
Author Message
ramon fincken
Site's programmer


Joined: 03 Aug 2007
Posts: 93
Location: Amsterdam, the Netherlands/Europe

PostPosted: Fri Nov 16, 2007 8:45 pm    Post subject: [snipplet] Function convert unix PHP time to a normal date Reply with quote

This handy little fellow will help you in converting a unix PHP time ( time() ) to a normal date:


Code:
function unix_todate($timestamp, $format = 'd m Y') {
   return date($format, $timestamp);
}



Further reading:
http://www.php.net/manual/en/function.mktime.php ( mktime — Get Unix timestamp for a date )
http://www.php.net/manual/en/function.gmdate.php ( gmdate — Format a GMT/UTC date/time )
http://www.php.net/manual/en/function.date.php ( date — Format a local time/date )
Back to top
View user's profile Send private message Visit poster's website
Google adsense
Advertisement





PostPosted: Fri Nov 16, 2007 8:45 pm    Post subject: [snipplet] Function convert unix PHP time to a normal date

Advertisement
Back to top
Post new topic   Reply to topic    Ramonfincken.com Forum Index -> PHP coding All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
General forums
The world of freelance
Programming
Other projects
Poll
I love gifts

Yes goodies and presents! [1]
No but I love polls ! [0]

Technorati Profile