02-13-2008, 03:44 AM
|
#1 (permalink)
|
|
The Contributor
Join Date: Nov 2007
Posts: 35
Thanks: 21
|
unix timestamps and group by
OK, i'm having trouble with a query that I hope someone can help me with...
I have a table that stores signup dates in unix timestamp format and I'm having problems trying to output data in this way:
date | signups
02-01-2008 | 5
02-02-2008 | 50
02-03-2008 | 10
02-04-2008 | 20
02-05-2008 | 25
SELECT sup_date, COUNT(id) FROM users WHERE sup_date > "1199145600" AND sup_date < "1202774400" GROUP BY sup_date
is there a way to convert the timestamps to output dates???
my goal is to be able to query the amount of signups for each day for the past 30 days - maybe i'm going about it wrong..
__________________
one outstanding employee does more and costs less than two adequate performers.
|
|
|
|