{"id":8571,"date":"2018-06-12T16:45:53","date_gmt":"2018-06-12T14:45:53","guid":{"rendered":"https:\/\/blog.sheetgo.com\/?p=8571"},"modified":"2018-06-12T16:45:53","modified_gmt":"2018-06-12T14:45:53","slug":"formula-de-dia-no-planilhas-google","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/pt\/blog\/google-sheets-formulas\/day-formula-in-google-sheets\/","title":{"rendered":"Como usar a f\u00f3rmula DAY no Planilhas Google"},"content":{"rendered":"\n[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; theme_builder_area=&#8221;post_content&#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; theme_builder_area=&#8221;post_content&#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; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<p>There can be situations where we\u2019d like to extract the day of the month from a given date. Probably to use it with another formula that decides if it falls in the first half or second half of the month. On a quick look, we can quickly identify the day of the month. But the machine doesn\u2019t know it directly. Because a date is just a numeric value for any spreadsheets application. For example, the underlying numeric value for the\u00a0date \u201c7-Jun-2018\u201d is 43,258. So how do we extract the day of the month from this numeric value? The<span>\u00a0<\/span><a href=\"https:\/\/support.google.com\/docs\/answer\/3093040\" target=\"_blank\" rel=\"noopener noreferrer\">DAY<\/a><span>\u00a0<\/span>formula is available for just this purpose, to calculate<strong><em>\u00a0<\/em><\/strong>the<em><\/em><strong><em><span>\u00a0<\/span>Google Sheets day of month formula<\/em><\/strong>.<\/p>\n<h3>Syntax<\/h3>\n<p><strong>DAY(date)<\/strong><\/p>\n<p><strong>date<\/strong><span>\u00a0<\/span>\u2013 is the date which we need to extract the day from. This input has to be a date type data.\u00a0We can\u00a0ensure that either by using formulas such as\u00a0<a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/date-formula-google-sheets\/\" target=\"_blank\" rel=\"noopener noreferrer\">DATE<\/a>, DATEVALUE or TO_DATE that return date objects. Or we may also use\u00a0references to the cells that have dates or numbers.<\/p>\n<p>&nbsp;<\/p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<h3>Usage: Google Sheets day of month formula<\/h3>\n<p>The syntax we just learned\u00a0suggests that the DAY formula in Google Sheets is pretty simple and straightforward. Let us further reinforce our understanding with the help of a few practical examples.<\/p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/google-sheets-day-of-month-1.png&#8221; alt=&#8221;google sheets day of month 1&#8243; title_text=&#8221;google sheets day of month 1&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<p>As you may have noticed we have tried various ways in which we can pass the input parameter value. In the first example, we passed a valid date string, and the formula, as expected returned 7. The second example demonstrates the capability of the formula to accept the references to cells that have dates within them. The third example worked even when there\u2019s a number on the cell. Co-incidentally the number 43,258 is equivalent to the date 7-Jun-2017 in Google Sheets. Hence it returned the value 7. On the fourth example, we tried embedding a DATE function within the formula.<\/p>\n<p>While the first four examples demonstrate the working of the formula itself, we tried more practical examples on the rows 6 and 7.\u00a0Here we are trying to deduce whether a day belongs to the first half of the month or the second. And the composite formula delivers its job religiously indicating which day belongs to which half.<\/p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]\n","protected":false},"excerpt":{"rendered":"<p>There can be situations where we\u2019d like to extract the day of the month from a given date. Probably to use it with another formula that decides if it falls in the first half or second half of the month. On a quick look, we can quickly identify the day of the month. But the [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":8575,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"There can be situations where we'd like to extract the day of the month from a given date. Probably to use it with another formula that decides if it falls in the first half or second half of the month. On a quick look, we can quickly identify the day of the month. But the machine doesn't know it directly. Because a date is just a numeric value for any spreadsheets application. For example, the underlying numeric value for the\u00a0date \"7-Jun-2018\" is 43,258. So how do we extract the day of the month from this numeric value? The <a href=\"https:\/\/support.google.com\/docs\/answer\/3093040\">DAY<\/a> formula in Google Sheets is just available for this purpose.\n<h3>Syntax<\/h3>\n<strong>DAY(date)<\/strong>\n\n<strong>date<\/strong> - is the date which we need to extract the day from. This input has to be a date type data.\u00a0We can\u00a0ensure that either by using formulas such as\u00a0<a href=\"https:\/\/www.sheetgo.com\/date-formula-google-sheets\/\">DATE<\/a>, DATEVALUE or TO_DATE that return date objects. Or we may also use\u00a0references to the cells that have dates or numbers.\n<h3>Usage: DAY formula in Google Sheets<\/h3>\nThe syntax we just learned\u00a0suggests that it is a pretty simple and straightforward formula. Let us further reinforce our understanding with the help of a few practical examples.\n\n<img class=\"aligncenter wp-image-8618 size-full\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2018\/06\/DAY-formula-Illustration-Frame-2.png\" alt=\"DAY formula in Google Sheets\" width=\"812\" height=\"520\" \/>\n\nAs you may have noticed we have tried various ways in which we can pass the input parameter value. In the first example, we passed a valid date string, and the formula, as expected returned 7. The second example demonstrates the capability of the formula to accept the references to cells that have dates within them. The third example worked even when there's a number on the cell. Co-incidentally the number 43,258 is equivalent to the date 7-Jun-2017 in Google Sheets. Hence it returned the value 7. On the fourth example, we tried embedding a DATE function within the formula.\n\nWhile the first four examples demonstrate the working of the formula itself, we tried more practical examples on the rows 6 and 7.\u00a0Here we are trying to deduce whether a day belongs to the first half of the month or the second. And the composite formula delivers its job religiously indicating which day belongs to which half.","_et_gb_content_width":"","footnotes":""},"categories":[54],"tags":[55,39,28],"class_list":["post-8571","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-sheets-formulas","tag-ben-collins","tag-connections-t","tag-spreadsheets"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/8571","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=8571"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/8571\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media\/8575"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media?parent=8571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/categories?post=8571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/tags?post=8571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}