Formulas, Database

Building a Project Time Tracker in Notion

Track your productivity

A project time tracker in Notion is a database that allows you to track the time you spend on different tasks and projects. This can be helpful for improving your productivity, and managing your time more effectively. In addition to tracking time lapsed in date-time ranges, group and calculate total time spent by projects, month, or week.

Difficulty: this tutorial is ideal for Notion beginners.

Step 1: Create a new database

To create a new database, type “/table” in any empty page.

Add the following properties to your database:

  • Name: The name of the task you are tracking time for.

  • Project: A select property with options detailing the project associated with each task.

  • Done: A checkbox property indicating the task is complete.

  • Work-span: A single date range between start and end time.

    • This is a date property with end date and include time toggled on.

  • Hours + Min: The total hours and minutes you spent on the task.

    • This will be calculated using a formula.

Add rows to your database for each task you want to track time for.

 

Step 2: Create a formula property to track time

There are two options for tracking time lapsed between two dates or a date range. Use either of these formulas inside the Hours.

Number: Return the number of hours and minutes lapsed.

if(prop("Done"),	
	floor(100 *
		dateBetween(
			prop("Work-span").dateEnd(),
			prop("Work-span"), 
			"minutes"
		) / 60
	) / 100,
	toNumber("")	
)

String: Return a string that calculates hours and minutes lapsed (“#hr #m”).

if(prop("Done"),
	dateBetween(
		prop("Work-span").dateEnd(),
		prop("Work-span"), 
		"hours"
	) +
	" hr " + 
	dateBetween(
		prop("Work-span").dateEnd(),
		prop("Work-span"), 
		"minutes"
	) % 60 +
	" m",
	""
)
 

Step 3: Group tasks by projects

Implement a grouping feature to this view. Choose to group by Project:

Calculate sum of Hours + Min for each group. This is only possible using the number formula option above:

 

Step 4: Create a View for done tasks

Add a new view to store all completed tasks.

Tip: duplicate an existing view to retain settings.

Group tasks by month or week to calculate total time in a specified time period.

Add a filter that shows all tasks with a Done property that is checked

 

Additional notes

  • Group and calculate total time spent per client instead of project for invoice calculations.

  • Journalers can use this database as part of a weekly or monthly progress report.