Home » » What is Time Calculations (Worked Hours) in Google Sheets?

What is Time Calculations (Worked Hours) in Google Sheets?

What is Time Calculations (Worked Hours) in Google Sheets?

Google Sheets is a powerful and versatile spreadsheet application that allows you to create, edit, and share data online. One of the many features of Google Sheets is the ability to perform time calculations, such as adding, subtracting, or finding the difference between two times. This can be useful for various purposes, such as tracking your working hours, scheduling appointments, or managing projects.

In this article, we will explain how to perform time calculations in Google Sheets, and provide some examples and tips to help you get started.

How to Format Time Cells in Google Sheets

Before you can perform any time calculations in Google Sheets, you need to make sure that your cells are formatted correctly. Google Sheets recognizes two types of time formats: time and duration.

  • Time format displays a specific point in time, such as 10:30 AM or 3:45 PM. You can also include the date with the time, such as 10/9/2023 10:30 AM. To format a cell as time, select the cell and go to Format > Number > Time or Format > Number > Date Time from the menu bar.
  • Duration format displays a period of time, such as 5 hours or 2 minutes. You can also include hours, minutes, and seconds in the duration, such as 5:54:28. To format a cell as duration, select the cell and go to Format > Number > Duration from the menu bar.

You can also use custom number formats to display time and duration in different ways. For example, you can use h:mm:ss AM/PM to show the time with seconds and AM/PM indicators, or [h]:mm:ss to show the duration with brackets around the hours. To apply a custom number format, select the cell and go to Format > Number > More Formats > Custom Number Format from the menu bar.

How to Add or Subtract Time in Google Sheets

To add or subtract time in Google Sheets, you can use the standard + and - operators. For example, if you want to add 5 hours and 30 minutes to 10:00 AM, you can use the formula =10:00+5:30. Similarly, if you want to subtract 2 hours and 15 minutes from 3:00 PM, you can use the formula =15:00-2:15.

You can also add or subtract hours, minutes, or seconds separately by using the TIME function. The TIME function takes three arguments: hours, minutes, and seconds. For example, if you want to add 30 seconds to 10:00 AM, you can use the formula =10:00+TIME(0,0,30). If you want to subtract 45 minutes from 3:00 PM, you can use the formula =15:00-TIME(0,45,0).

Note that when you add or subtract time in Google Sheets, the result may exceed 24 hours or become negative. In that case, you need to adjust the number format accordingly. For example, if you want to show the result as a duration longer than 24 hours, you need to use a custom number format with brackets around the hours, such as [h]:mm. If you want to show the result as a negative time value, you need to enable negative time values in your spreadsheet settings. To do that, go to File > Spreadsheet Settings > Calculation and check the box next to Enable iterative calculation.

How to Find the Difference Between Two Times in Google Sheets

To find the difference between two times in Google Sheets, you can simply subtract one time from another. For example, if you want to find out how long it took you to complete a task that started at 10:00 AM and ended at 11:15 AM, you can use the formula =11:15-10:00. The result will be 1:15 (one hour and 15 minutes).

You can also use the TEXT function to display the difference between two times in different formats. The TEXT function takes two arguments: a value and a format string. For example, if you want to show the difference between two times as hours only, you can use the formula =TEXT(B2-A2,"h"). If you want to show the difference between two times as hours and minutes only, you can use the formula =TEXT(B2-A2,"h:mm"). If you want to show the difference between two times as hours, minutes, and seconds only, you can use the formula =TEXT(B2-A2,"h:mm:ss").

Note that when you use the TEXT function to display the difference between two times, the result will be formatted as text. This means that you cannot use it for further calculations. If you want to use the result for other purposes, you need to convert it back to a number by using the VALUE function. For example, if you want to multiply the difference between two times by a rate, you can use the formula =VALUE(TEXT(B2-A2,"h:mm:ss"))*C2.

Tips and Tricks for Time Calculations in Google Sheets

Here are some tips and tricks to help you perform time calculations in Google Sheets more efficiently and effectively:

  • To enter the current date and time in a cell, use the keyboard shortcut Ctrl+; (semicolon) for the date and Ctrl+Shift+; (semicolon) for the time. You can also use the NOW function to return the current date and time as a value that updates automatically.
  • To enter a specific time value in a cell, you can use the colon (:) as a separator between hours, minutes, and seconds. For example, you can enter 10:30 AM as 10:30 or 10:30:00. You can also use the TIME function to create a time value from hours, minutes, and seconds. For example, you can enter 10:30 AM as =TIME(10,30,0).
  • To enter a specific duration value in a cell, you can use the colon (:) as a separator between hours, minutes, and seconds. For example, you can enter 5 hours and 30 minutes as 5:30 or 5:30:00. You can also use the TIME function to create a duration value from hours, minutes, and seconds. For example, you can enter 5 hours and 30 minutes as =TIME(5,30,0).
  • To convert a time value to a decimal number that represents the fraction of a day, you can divide the time value by 24. For example, if you want to convert 10:00 AM to a decimal number, you can use the formula =10:00/24. The result will be 0.416666667 (10/24).
  • To convert a decimal number that represents the fraction of a day to a time value, you can multiply the decimal number by 24. For example, if you want to convert 0.416666667 to a time value, you can use the formula =0.416666667*24. The result will be 10:00.
  • To extract the hour, minute, or second component from a time value, you can use the HOUR, MINUTE, or SECOND function. For example, if you want to extract the hour component from 10:30 AM, you can use the formula =HOUR(10:30). The result will be 10.
  • To extract the date or time component from a date-time value, you can use the INT or MOD function. For example, if you want to extract the date component from 10/9/2023 10:30 AM, you can use the formula =INT(10/9/2023 10:30). The result will be 10/9/2023. If you want to extract the time component from 10/9/2023 10:30 AM, you can use the formula =MOD(10/9/2023 10:30,1). The result will be 10:30.

We hope this article has helped you understand how to perform time calculations in Google Sheets. If you have any questions or feedback, please feel free to leave a comment below. Thank you for reading!

0 মন্তব্য(গুলি):

একটি মন্তব্য পোস্ট করুন

Comment below if you have any questions

অফিস/বেসিক কম্পিউটার কোর্স

এম.এস. ওয়ার্ড
এম.এস. এক্সেল
এম.এস. পাওয়ার পয়েন্ট
বাংলা টাইপিং, ইংরেজি টাইপিং
ই-মেইল ও ইন্টারনেট

মেয়াদ: ২ মাস (সপ্তাহে ৪দিন)
রবি+সোম+মঙ্গল+বুধবার

কোর্স ফি: ৪,০০০/-

গ্রাফিক ডিজাইন কোর্স

এডোব ফটোশপ
এডোব ইলাস্ট্রেটর

মেয়াদ: ৩ মাস (সপ্তাহে ২দিন)
শুক্র+শনিবার

কোর্স ফি: ৮,৫০০/-

ওয়েব ডিজাইন কোর্স

এইচটিএমএল ৫
সিএসএস ৩

মেয়াদ: ৩ মাস (সপ্তাহে ২দিন)
শুক্র+শনিবার

কোর্স ফি: ৮,৫০০/-

ভিডিও এডিটিং কোর্স

এডোব প্রিমিয়ার প্রো

মেয়াদ: ৩ মাস (সপ্তাহে ২দিন)
শুক্র+শনিবার

কোর্স ফি: ৯,৫০০/-

ডিজিটাল মার্কেটিং কোর্স

ফেসবুক, ইউটিউব, ইনস্টাগ্রাম, এসইও, গুগল এডস, ইমেইল মার্কেটিং

মেয়াদ: ৩ মাস (সপ্তাহে ২দিন)
শুক্র+শনিবার

কোর্স ফি: ১২,৫০০/-

অ্যাডভান্সড এক্সেল

ভি-লুকআপ, এইচ-লুকআপ, অ্যাডভান্সড ফাংশনসহ অনেক কিছু...

মেয়াদ: ২ মাস (সপ্তাহে ২দিন)
শুক্র+শনিবার

কোর্স ফি: ৬,৫০০/-

ক্লাস টাইম

সকাল থেকে দুপুর

১ম ব্যাচ: সকাল ০৮:০০-০৯:৩০

২য় ব্যাচ: সকাল ০৯:৩০-১১:০০

৩য় ব্যাচ: সকাল ১১:০০-১২:৩০

৪র্থ ব্যাচ: দুপুর ১২:৩০-০২:০০

বিকাল থেকে রাত

৫ম ব্যাচ: বিকাল ০৪:০০-০৫:৩০

৬ষ্ঠ ব্যাচ: বিকাল ০৫:৩০-০৭:০০

৭ম ব্যাচ: সন্ধ্যা ০৭:০০-০৮:৩০

৮ম ব্যাচ: রাত ০৮:৩০-১০:০০

যোগাযোগ:

আলআমিন কম্পিউটার প্রশিক্ষণ কেন্দ্র

৭৯৬, পশ্চিম কাজীপাড়া বাসস্ট্যান্ড,

[মেট্রোরেলের ২৮৮ নং পিলারের পশ্চিম পাশে]

কাজীপাড়া, মিরপুর, ঢাকা-১২১৬

মোবাইল: 01785 474 006

ইমেইল: alamincomputer1216@gmail.com

ফেসবুক: facebook.com/ac01785474006

ব্লগ: alamincomputertc.blogspot.com

Contact form

নাম

ইমেল *

বার্তা *