Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old September 12th, 2003, 01:19 PM
Raith Raith is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 2 Raith User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Simple question about unix epoch

I am learning, but I need some help on a problem I have atm. I am using Invision Board Forums and want to query the db for members on name, total posts, join date, last post, last visit, and email. The problem is join date, last post and last visit come up as unix timestamp and I am not sure how/if I can convert those to standard date format in the query.

Please if anybody could post a solution or the query structure I would appreciate it as this is just a side hobby for me.

Just some info:

db name is members
column names are name, joined, posts, last_post, last_visit, email

Reply With Quote
  #2  
Old September 12th, 2003, 02:01 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Simple question about unix epoch

use the FROM_UNIXTIME function as follows...

select name, FROM_UNIXTIME(joined,'%m/%d/%Y')as join_date, posts, FROM_UNIXTIME(last_post,'%m/%d/%Y')as last_post, FROM_UNIXTIME(last_visit,'%m/%d/%Y')as last_visit, email from members where ...(put your conditionals here)

This will return the unix timestamps like

01/01/2003

give it a try...

Reply With Quote
  #3  
Old September 12th, 2003, 02:07 PM
Raith Raith is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 2 Raith User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Simple question about unix epoch

Thank you very much!

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > Simple question about unix epoch


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT