4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Converting the timestamp to readable format
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
rippleffect
Junior WebHelper
Junior WebHelper


Joined: 13 Nov 2003
Posts: 10

PostPosted: Thu Nov 13, 2003 1:55 am (13 years, 11 months ago) Reply with QuoteBack to Top

I was so happy when I found Daniel's nifty tool to convert this into readable format. I was wondering if anyone know how to convert it so that I can use this on my site. Because when I query last_post date from the database, it returns whole buncha numbers. Rolling Eyes
any help on this matter will help me out so much! I tried looking into the date() and mktime() but I have no idea how to use this correctly. any sample of it would be great!
OfflineView User's ProfileFind all posts by rippleffectSend Personal Message
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Thu Nov 13, 2003 8:21 am (13 years, 11 months ago) Reply with QuoteBack to Top

what kind of date do you want it to be displayed as? i.e. Thursday November 13, or 13/11/2003, etc.
I can give ya the code Wink

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
rippleffect
Junior WebHelper
Junior WebHelper


Joined: 13 Nov 2003
Posts: 10

PostPosted: Thu Nov 13, 2003 4:20 pm (13 years, 11 months ago) Reply with QuoteBack to Top

Adam, thx for your help Very Happy

Thursday November 13 would suit me perfect. Smile
Thank you so much!
OfflineView User's ProfileFind all posts by rippleffectSend Personal Message
rippleffect
Junior WebHelper
Junior WebHelper


Joined: 13 Nov 2003
Posts: 10

PostPosted: Thu Nov 13, 2003 5:18 pm (13 years, 11 months ago) Reply with QuoteBack to Top

Actually, someone else have helped me to solved this.
But thx for the help Very Happy
OfflineView User's ProfileFind all posts by rippleffectSend Personal Message
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Thu Nov 13, 2003 5:20 pm (13 years, 11 months ago) Reply with QuoteBack to Top

date("l F m",$unixdate); will return what you want - where $unixdate is the date as stored in the database.

if you don't want leading zeros (i.e. 1 instead of 01) just use date("l F j",$unixdate); instead. and incase it's not clear in the font, thats a lower case L, not an upper case i.

edit: ok, too late Smile

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
rippleffect
Junior WebHelper
Junior WebHelper


Joined: 13 Nov 2003
Posts: 10

PostPosted: Thu Nov 13, 2003 8:38 pm (13 years, 11 months ago) Reply with QuoteBack to Top

Thx! nice to know that info too Very Happy
OfflineView User's ProfileFind all posts by rippleffectSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 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.


Page generation time: 0.054501 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme