Skip to content

Instantly share code, notes, and snippets.

@TehShrike
Created February 2, 2018 19:44
Show Gist options
  • Save TehShrike/351b9a8e5d7552b9cd36e19c4279aa9d to your computer and use it in GitHub Desktop.
Save TehShrike/351b9a8e5d7552b9cd36e19c4279aa9d to your computer and use it in GitHub Desktop.
Get daily totals out of Toggl
# gotta remove spaces from the column names in the csv first
q -d , -H "SELECT Startdate, SUM(ROUND((((STRFTIME('%H', Endtime) * 60) + STRFTIME('%M', Endtime)) - ((STRFTIME('%H', Starttime) * 60) + STRFTIME('%M', Starttime)) * 1.0) / 60, 2)) FROM Toggl_time_entries_2018-01-16_to_2018-01-31.csv GROUP BY Startdate"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment