-
-
Save lbell/b4e2346fe3f5b7a0916f1079d5a1db4a to your computer and use it in GitHub Desktop.
SQL query to export Hamster database to toggl time tracker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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', | |
| tags.name as 'Tags' | |
| from | |
| facts, categories, activities, fact_tags, tags | |
| where | |
| facts.activity_id = activities.id | |
| and activities.category_id = categories.id | |
| and facts.id = fact_tags.fact_id | |
| and tags.id = fact_tags.tag_id; |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added tag (just pulls the first tag it comes across which is fine for me since I only usually use one tag)