# Formula to calculate the number of weeks between start date & completion date

• 1
• Question
• Updated 2 years ago
I have a database which is used to track service.  Each engineer is assigned a service ticket with a start date and completion date.  I am trying to calculate the [Start Date] and [Completion Date] date into a week format (how many weeks from start to finish).  From that point, I would like to calculate how many weeks each engineer has worked and a total amount of weeks worked for all engineers
• 184 Points

Posted 2 years ago

• 1

Evan Martinez, Community Manager

• 12,658 Points
Hi Carol,

There is a formula function in Quick Base ToWeeks that will take a Duration and return how many weeks it contains. For example if you used ToWeeks(Days(14)) it would return the numeric value 2. Or in your example if you did ToWeeks([Completion Date]-[Start Date] It would turn that interval into a number of weeks (With anything less then a full week expressed in decimal places). You would just want to make sure that the Completion Date and Start Date field were both Date fields.

As you are building out your formulas we also have a formula function guide that points out some of the most commonly used formula functions and their use: