Click here to Skip to main content
15,909,498 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
How to get weekly data using sqlite query .

if select one date from that date i need to get data accordly weekly .

Regards,
karthick
Posted

1 solution

You haven't supplied much to go on, but here's an example query:

SQL
SELECT COUNT(*),STRFTIME('%Y-%W',created,'unixepoch') AS creat 
FROM Files GROUP BY creat


This query counts the number of entries in the Files table, grouped by week.

SQLite date functions: http://www.sqlite.org/lang_datefunc.html[^]
 
Share this answer
 
Comments
[no name] 19-Oct-11 6:47am    
Hi i didnt get correct answer

my start date is 18-04-2011 and end date is 03-05-2011

i need get 7 days data's like 18 to 24 and 24 to 30 ... like that

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900