Skip to content

Commit

Permalink
Fixed week interval issue with sqlite
Browse files Browse the repository at this point in the history
  • Loading branch information
ivirabyan committed Apr 4, 2013
1 parent 348f84a commit d2810e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qsstats/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def get_interval_sql(date_field, interval, engine):
'minutes': "strftime('%%Y-%%m-%%d %%H:%%M', `" + date_field + "`)",
'hours': "strftime('%%Y-%%m-%%d %%H:00', `" + date_field + "`)",
'days': "strftime('%%Y-%%m-%%d', `" + date_field + "`)",
'weeks': "strftime('%%Y-%%W', `" + date_field + "`)",
'weeks': "strftime('%%Y-%%m-%%d', julianday(`" + date_field + "`) - strftime('%%w', `" + date_field + "`) + 1)",
'months': "strftime('%%Y-%%m-01', `" + date_field + "`)",
'years': "strftime('%%Y-01-01', `" + date_field + "`)",
},
Expand Down

0 comments on commit d2810e1

Please sign in to comment.