Jasper Duizendstra demonstrates how with a little bit of Google Apps Script you can easily use your Google Calendar to keep a record of how much time you spend on tasks and then query/report this via Google Sheets. The post contains instructions and code for getting started
Source: Record time and activities with Google Sheets, Calendar and Apps Script
Member of Google Developers Experts Program for Google Workspace (Google Apps Script) and interested in supporting Google Workspace Devs.
Great in theory. Unfortunately though, it does not work.