Skip to content

Instantly share code, notes, and snippets.

@oscarfonts
Created October 28, 2015 14:43
Show Gist options
  • Save oscarfonts/01430ddf5228cf9554e9 to your computer and use it in GitHub Desktop.
Save oscarfonts/01430ddf5228cf9554e9 to your computer and use it in GitHub Desktop.
SQL query to export Hamster database to toggl time tracker
select
"[email protected]" as 'Email',
date(facts.start_time) as 'Start date',
time(facts.start_time) as 'Start time',
strftime('%H:%M:%S', strftime('%s',facts.end_time) - strftime('%s',facts.start_time), 'unixepoch') as 'Duration',
categories.name as 'Project',
activities.name as 'Description'
from
facts, categories, activities
where
facts.activity_id = activities.id
and activities.category_id = categories.id;
@oscarfonts
Copy link
Author

See toggl CSV import format spec:
https://support.toggl.com/csv-import-new/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment