{"id":2677,"date":"2015-05-21T09:45:08","date_gmt":"2015-05-21T09:45:08","guid":{"rendered":"http:\/\/wiki.davelevy.info\/?p=2677"},"modified":"2015-05-21T09:45:21","modified_gmt":"2015-05-21T09:45:21","slug":"date-differences-in-excel","status":"publish","type":"post","link":"https:\/\/davelevy.info\/wiki\/date-differences-in-excel\/","title":{"rendered":"Date  Differences in Excel"},"content":{"rendered":"<p>I was looking to calculate if someone was under 27 years old; this can Be quite tricky but excel has just the function, =DATEDIF().<!--more--><\/p>\n<p><code>=DATEDIF(B3,DATE(YEAR(NOW()),MONTH(NOW()),DAY(NOW())),\"y\")<\/code><\/p>\n<p>returns the number of years between NOW and date held in cell B3. (It handles all the year rounding and leap years so there&#8217;s no need to worry about rounding etc.<\/p>\n<p><code>IF(DATEDIF(B3,DATE(YEAR(NOW()),MONTH(NOW()),DAY(NOW())),\"y\")>25,1,0)<\/code><\/p>\n<p>will return true (1) or false (0) depending on if the difference between the dates is greater than 25 years of not.<\/p>\n<p>I used the www.cpearson,com site as my guide.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was looking to calculate if someone was under 27 years old; this can Be quite tricky but excel has just the function, =DATEDIF().<\/p>\n","protected":false},"author":1,"featured_media":2678,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_share_on_mastodon":"0"},"categories":[27,3],"tags":[888,458,156,920,911],"class_list":["post-2677","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","category-technology","tag-arithmatictime","tag-datetime","tag-excel","tag-software","tag-technology"],"share_on_mastodon":{"url":"","error":""},"jetpack_featured_media_url":"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2015\/05\/excel-175sq.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/2677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/comments?post=2677"}],"version-history":[{"count":0,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/2677\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media\/2678"}],"wp:attachment":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media?parent=2677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/categories?post=2677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/tags?post=2677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}