Hello all, 

 

I have a table with a unixepoch column in it. 

 

I need to do some fancy calculation based on that time, hourly summaries,
weekly averages, standard dev, etc..

 

Right now..I'm only using it for reporting and simple analysis and it's
often formatted like this: datetime(eventtime, 'unixepoch', 'localtime')

 

What I need is a count all the records grouped by week or by day or by month
so I can do some more advanced processing on it.  

 

I'm missing something simple since I can't seem to get it to work.  Here is
an example of how I'm trying to get the week number:

date(datetime(eventtime, 'unixepoch', 'localtime'), '%W')

based on http://www.sqlite.org/lang_datefunc.html

it seemed to me that the date function needs a string so I passed in a
formatted string.  No joy.

 

Can someone point out the error in my ways?

 

Thank you,

 

Gene

 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to