{"id":529,"date":"2014-10-04T19:53:18","date_gmt":"2014-10-04T17:53:18","guid":{"rendered":"https:\/\/www.myexcelonline.com\/?p=529"},"modified":"2023-11-30T20:19:45","modified_gmt":"2023-11-30T19:19:45","slug":"datedif-function-introduction","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/datedif-function-introduction\/","title":{"rendered":"DATEDIF function: Introduction"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p><em><strong>What does it do? <\/strong><\/em><\/p>\n<p>Calculates the number of Days, Months, or Years between two dates<\/p>\n<p><em><strong>Formula breakdown: <\/strong><\/em><\/p>\n<p>=DATEDIF(<span style=\"color: #0000ff;\">Start Date<\/span>,<span style=\"color: #ff6600;\">End Date<\/span>,<span style=\"color: #008000;\">Interval<\/span>)<\/p>\n<p><em><strong>What it means:<\/strong><\/em><\/p>\n<p>=DATEDIF(<span style=\"color: #0000ff;\">starting date<\/span>, <span style=\"color: #ff6600;\">ending date<\/span>, <span style=\"color: #008000;\">the unit of measuremen<\/span>t)<\/p>\n<p>Where <strong>INTERVAL<\/strong> is:<\/p>\n<p>&#8220;<strong>m<\/strong>&#8221; Months , &#8220;<strong>ym<\/strong>&#8221; Months Excluding Years<br \/>\n&#8220;<strong>d<\/strong>&#8221; Days , &#8220;<strong>yd<\/strong>&#8221; Days Excluding Years<br \/>\n&#8220;<strong>y<\/strong>&#8221; Years , &#8220;<strong>md<\/strong>&#8221; Days Excluding Years And Months<\/p>\n<hr \/>\n<p>The <strong>DATEDIF<\/strong> function is a mystery function within Excel.\u00a0 When you write it out in a workbook it doesn&#8217;t give you any hints like other functions would and if you look it up in the function list you would not find it! Creepy&#8230;<\/p>\n<p>The <strong>DATEDIF<\/strong> function stands for &#8220;<strong>date difference<\/strong>&#8221; and it calculates the number of Days, Months, or Years between two dates.<\/p>\n<p>So if you want to find out how many days, years or months have passed since you were born, well this is the formula for you!\u00a0\u00a0 Well you can also extend this to project start and end dates, but you get my point.<\/p>\n<div class=\"after-post-box\">\n<p><iframe src=\"https:\/\/www.youtube.com\/embed\/jaUXQfRk4ZY?rel=0 \" width=\"800\" height=\"400\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><a href=\"https:\/\/www.youtube.com\/c\/MyExcelOnlinecomtutorials?sub_confirmation=1\" target=\"_blank\" rel=\"noopener noreferrer nofollow\"><img loading=\"lazy\" decoding=\"async\" class=\"alignmiddle wp-image-111468 size-full\" style=\"vertical-align: middle;\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/04\/1.yt_.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p class=\"line-two\"><a class=\"IRPP_minimalist icon-download button small\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/DateDif.xlsx\" target=\"_blank\" rel=\"noopener noreferrer\" data-leadbox=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/DateDif.xlsx\" data-leadbox-id=\"147284833f72a2:12f08263ab46dc\"><span class=\"ctaText px-3 text-capitalize\">Download excel workbook<i class=\"fa fa-download\"><\/i><\/span><span class=\"postTitle px-3\">DateDif.xlsx<\/span><\/a><\/p>\n<\/div>\n<p style=\"text-align: left;\"><span style=\"color: #ff0000;\"><strong>STEP 1:<\/strong><\/span> Enter the <strong>Start Date<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"DATEDIF function: Introduction\"  class=\"aligncenter size-full wp-image-9728\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/Datedif-01.png\" alt=\"DATEDIF function: Introduction\" width=\"309\" height=\"289\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/Datedif-01.png 309w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/Datedif-01-300x281.png 300w\" sizes=\"(max-width: 309px) 100vw, 309px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left;\"><span style=\"color: #ff0000;\"><strong>STEP 2:<\/strong><\/span> Enter the <strong>End Date<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"DATEDIF function: Introduction\"  class=\"aligncenter size-full wp-image-9729\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/Datedif-02.png\" alt=\"DATEDIF function: Introduction\" width=\"299\" height=\"284\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left;\"><span style=\"color: #ff0000;\"><strong>STEP 3:<\/strong><\/span> To get the<strong> number of months<\/strong> as a difference, type in the following formula<\/p>\n<h2 style=\"text-align: left;\"><span style=\"color: #0000ff;\">=DATEDIF(B12, B15, &#8220;m&#8221;)<\/span><\/h2>\n<p style=\"text-align: left;\">The <strong>DATEDIF<\/strong> arguments:<\/p>\n<p style=\"text-align: left;\">B12 is the <strong>startdate<\/strong><br \/>\nB15 is the <strong>enddate<\/strong><br \/>\nm tells it to <strong>count in total months<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"DATEDIF function: Introduction\"  class=\"aligncenter size-full wp-image-9730\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/Datedif-03.png\" alt=\"DATEDIF function: Introduction\" width=\"475\" height=\"398\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/Datedif-03.png 475w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/Datedif-03-300x251.png 300w\" sizes=\"(max-width: 475px) 100vw, 475px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left;\"><span style=\"color: #ff0000;\"><strong>STEP 4:<\/strong><\/span> To get the <strong>number of days on this year<\/strong> from your birthday, type in the following formula<\/p>\n<h2 style=\"text-align: left;\"><span style=\"color: #0000ff;\">=DATEDIF(B12, B15, &#8220;yd&#8221;)<\/span><\/h2>\n<p style=\"text-align: left;\">The <strong>DATEDIF<\/strong> arguments:<\/p>\n<p style=\"text-align: left;\">B12 is the <strong>startdate<\/strong><br \/>\nB15 is the <strong>enddate<\/strong><br \/>\nyd tells it to <strong>count in days but excluding the year portion<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"DATEDIF function: Introduction\"  class=\"aligncenter size-full wp-image-9731\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/Datedif-04.png\" alt=\"DATEDIF function: Introduction\" width=\"495\" height=\"418\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/Datedif-04.png 495w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/Datedif-04-300x253.png 300w\" sizes=\"(max-width: 495px) 100vw, 495px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left;\">And you have your calculated differences!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"DATEDIF function: Introduction\"  class=\"aligncenter size-full wp-image-9732\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/Datedif-05.png\" alt=\"DATEDIF function: Introduction\" width=\"309\" height=\"282\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/Datedif-05.png 309w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2014\/10\/Datedif-05-300x274.png 300w\" sizes=\"(max-width: 309px) 100vw, 309px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left;\"><span style=\"color: #0000ff;\"><strong>How to Use the DateDif Formula in Excel<\/strong><\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; What does it do? Calculates the number of Days, Months, or Years between two dates Formula breakdown: =DATEDIF(Start Date,End Date,Interval) What it means: =DATEDIF(starting date, ending date, the unit of measurement) Where INTERVAL is: &#8220;m&#8221; Months , &#8220;ym&#8221; Months Excluding Years &#8220;d&#8221; Days , &#8220;yd&#8221; Days Excluding Years &#8220;y&#8221; Years , &#8220;md&#8221; Days Excluding [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":17382,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cos_headline_score":0,"cos_seo_score":0,"cos_headline_text":"","cos_headline_has_been_analyzed":false,"cos_last_analyzed_headline":[],"om_disable_all_campaigns":false},"categories":[294,13,3],"tags":[59,43],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/529"}],"collection":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/comments?post=529"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/529\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/17382"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}