{"id":8576,"date":"2018-06-13T16:48:26","date_gmt":"2018-06-13T14:48:26","guid":{"rendered":"https:\/\/blog.sheetgo.com\/?p=8576"},"modified":"2018-06-13T16:48:26","modified_gmt":"2018-06-13T14:48:26","slug":"formula-de-hora-no-google-sheets","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/pt\/blog\/google-sheets-formulas\/hour-formula-in-google-sheets\/","title":{"rendered":"Como usar a f\u00f3rmula HOUR no Planilhas Google"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; module_class=&#8221;sheetgo-post&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221;]<\/p>\n<p>At times we may need to pick the hour from a time value. Possibly to use it with another formula that calculates an overtime paycheck. Manually, we can quickly identify the hour of the day by looking at the time. However, the machine cannot directly deduce it without additional help. Because, just like the date, time is also is a numeric value on the spreadsheets application. For example, the underlying numeric value for \u201c19:40:48\u201d is 0.82. So how do we extract the hour of the day from this numeric value? The<span>\u00a0<\/span><a href=\"https:\/\/support.google.com\/docs\/answer\/3093045\" target=\"_blank\" rel=\"noopener noreferrer\">HOUR<\/a><span>\u00a0<\/span>formula in Google Sheets can help us do that.<\/p>\n<h3>Syntax<\/h3>\n<p><strong>HOUR(time)<\/strong><\/p>\n<p><strong>time<\/strong><span>\u00a0<\/span>\u2013 is the time which we need to extract the hour component from. This input has to be a date\/time type data.\u00a0We can\u00a0ensure that either by using formulas that return date\/time objects. Or we may also use\u00a0references to the cells that have dates or numbers.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h3>Usage: HOUR formula in Google Sheets<\/h3>\n<p>It is very simple and straightforward and to use this formula because it takes in just one compulsory parameter. We just reviewed the syntax, now it is time to concrete our understanding with the help of a few practical examples. Please see the image below.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2018\/06\/HOUR-formula-Illustration-Frame-1.png&#8221; alt=&#8221;HOUR Formula in Google Sheets: Usage&#8221; title_text=&#8221;hour-formula-usage&#8221; _builder_version=&#8221;4.16&#8243; width=&#8221;640px&#8221; max_width=&#8221;640px&#8221; height=&#8221;440px&#8221; max_height=&#8221;440px&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221;]<\/p>\n<p>You\u2019ll see that we have tried multiple possible ways in which we can pass the value for the input parameter. In the first example, we passed a valid time string. So, the formula has returned the value 15 as expected. The second example proves that the formula can also take in AM\/PM time formatting, yet returns the hour as 15. Because\u00a0it is the same input as in the first example.<\/p>\n<p>The third example demonstrates the capability of the formula to accept the references to cells that have dates\/times within them. The fourth example worked even when there\u2019s a number on the cell. For those of us who are wondering what the rational number 43,258.82 corresponds to, it stands for \u201c7-Jun-2017 7:40:48 PM\u201d in Google Sheets. Hence the formula returned the value 19 for output.<\/p>\n<p>Now, let us move on to more practical examples on the rows 6 and 7.\u00a0Here we are trying to deduce whether an hour qualifies for the overtime pay or not. And the composite formula we built does it seamlessly.<\/p>\n<p>To extract the day of the month from a given date, check out the following blog post on how to use the<span>\u00a0<\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/day-formula-in-google-sheets\/\" target=\"_blank\" rel=\"noopener noreferrer\">DAY formula in Google Sheets.<\/a><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At times we may need to pick the hour from a time value. Possibly to use it with another formula that calculates an overtime paycheck. Manually, we can quickly identify the hour of the day by looking at the time. However, the machine cannot directly deduce it without additional help. Because, just like the date, [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":8577,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"At times we may need to pick the hour from a time value. Possibly to use it with another formula that calculates an overtime paycheck. Manually, we can quickly identify the hour of the day by looking at the time. However, the machine cannot directly deduce it without additional help. Because, just like the date, time is also is a numeric value on the spreadsheets application. For example, the underlying numeric value for \"19:40:48\" is 0.82. So how do we extract the hour of the day from this numeric value? The <a href=\"https:\/\/support.google.com\/docs\/answer\/3093045\" target=\"_blank\" rel=\"noopener noreferrer\">HOUR<\/a> formula in Google Sheets can help us do that.\n<h3>Syntax<\/h3>\n<strong>HOUR(time)<\/strong>\n\n<strong>time<\/strong> - is the time which we need to extract the hour component from. This input has to be a date\/time type data.&nbsp;We can&nbsp;ensure that either by using formulas that return date\/time objects. Or we may also use&nbsp;references to the cells that have dates or numbers.\n<h3>Usage: HOUR formula in Google Sheets<\/h3>\nIt is very simple and straightforward and to use this formula because it takes in just one compulsory parameter. We just reviewed the syntax, now it is time to concrete our understanding with the help of a few practical examples. Please see the image below.\n\n<img class=\"aligncenter size-full wp-image-8620\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2018\/06\/HOUR-formula-Illustration-Frame-1.png\" alt=\"HOUR formula in Google Sheets\" width=\"812\" height=\"520\">\n\nYou'll see that we have tried multiple possible ways in which we can pass the value for the input parameter. In the first example, we passed a valid time string. So, the formula has returned the value 15 as expected. The second example proves that the formula can also take in AM\/PM time formatting, yet returns the hour as 15. Because&nbsp;it is the same input as in the first example.\n\nThe third example demonstrates the capability of the formula to accept the references to cells that have dates\/times within them. The fourth example worked even when there's a number on the cell. For those of us who are wondering what the rational number 43,258.82 corresponds to, it stands for \"7-Jun-2017 7:40:48 PM\" in Google Sheets. Hence the formula returned the value 19 for output.\n\nNow, let us move on to more practical examples on the rows 6 and 7.&nbsp;Here we are trying to deduce whether an hour qualifies for the overtime pay or not. And the composite formula we built does it seamlessly.","_et_gb_content_width":"","footnotes":""},"categories":[54],"tags":[39,28],"class_list":["post-8576","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-sheets-formulas","tag-connections-t","tag-spreadsheets"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/8576","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/comments?post=8576"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/8576\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media\/8577"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media?parent=8576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/categories?post=8576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/tags?post=8576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}