{"id":24,"date":"2014-02-13T05:17:38","date_gmt":"2014-02-13T11:17:38","guid":{"rendered":"http:\/\/www.teamdesk.net\/blog\/2014\/02\/dates-calculation-ignoring-weekends-and-holidays\/"},"modified":"2015-10-26T11:20:45","modified_gmt":"2015-10-26T16:20:45","slug":"dates-calculation-ignoring-weekends-and-holidays","status":"publish","type":"post","link":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/","title":{"rendered":"Dates calculation ignoring weekends and holidays"},"content":{"rendered":"<p>Calculating future dates (such as exact due dates or project delivery dates) is a pretty common task.<\/p>\n<p>Let\u2019s find an easy way to calculate future dates in TeamDesk.<\/p>\n<p>The simplest way is to add a number of days to a date value. For example, the End Date is 5 days after the Start Date. You can use the following formula for the End Date calculation:<\/p>\n<p>[Start Date]+5d<\/p>\n<p>The problem can occur if you need to account working days only, while excluding weekends and holidays from calculation.<\/p>\n<p>In this case you need to create the Calendar table. It has to comprise the Date column of the date type and the Holiday column of the checkbox type. The Date column must be set as a key column of the Calendar table.<\/p>\n<p>Now you can import the list of current year dates into the Calendar table. It\u2019s handier to import an excel file with dates. Then mark weekends and holidays in the Holiday checkbox column.<\/p>\n<p><a href=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/151.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-318\" src=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/151.png\" alt=\"15,1\" width=\"369\" height=\"259\" srcset=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/151.png 369w, https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/151-300x211.png 300w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/><\/a><\/p>\n<p>Create a Many-To-Many relation with a match condition [Date] &gt; [Start Date]<\/p>\n<p><a href=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/152.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-319\" src=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/152.png\" alt=\"15,2\" width=\"477\" height=\"305\" srcset=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/152.png 477w, https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/152-300x192.png 300w\" sizes=\"auto, (max-width: 477px) 100vw, 477px\" \/><\/a><\/p>\n<p>Create the End Date summary column with the Index function and filters.<\/p>\n<p><a href=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/153.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-320\" src=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/153.png\" alt=\"15,3\" width=\"479\" height=\"455\" srcset=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/153.png 479w, https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/153-300x285.png 300w\" sizes=\"auto, (max-width: 479px) 100vw, 479px\" \/><\/a><\/p>\n<p>As the result the End Date will be calculated automatically according to the data stored in the Calendar table.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Calculating future dates (such as exact due dates or project delivery dates) is a pretty common task. Let\u2019s find an easy way to calculate future dates in TeamDesk. The simplest way is to add a number of days to a date value. For example, the End Date is 5 days after the Start Date. You [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-tips-tricks"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Dates calculation ignoring weekends and holidays - TeamDesk Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dates calculation ignoring weekends and holidays - TeamDesk Blog\" \/>\n<meta property=\"og:description\" content=\"Calculating future dates (such as exact due dates or project delivery dates) is a pretty common task. Let\u2019s find an easy way to calculate future dates in TeamDesk. The simplest way is to add a number of days to a date value. For example, the End Date is 5 days after the Start Date. You [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/\" \/>\n<meta property=\"og:site_name\" content=\"TeamDesk Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-02-13T11:17:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-10-26T16:20:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/151.png\" \/>\n<meta name=\"author\" content=\"Mila\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mila\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/dates-calculation-ignoring-weekends-and-holidays\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/dates-calculation-ignoring-weekends-and-holidays\\\/\"},\"author\":{\"name\":\"Mila\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/63bd8646f2f4720f503116e38a190a6e\"},\"headline\":\"Dates calculation ignoring weekends and holidays\",\"datePublished\":\"2014-02-13T11:17:38+00:00\",\"dateModified\":\"2015-10-26T16:20:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/dates-calculation-ignoring-weekends-and-holidays\\\/\"},\"wordCount\":213,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/dates-calculation-ignoring-weekends-and-holidays\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/02\\\/151.png\",\"articleSection\":[\"Tips &amp; Tricks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/dates-calculation-ignoring-weekends-and-holidays\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/dates-calculation-ignoring-weekends-and-holidays\\\/\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/dates-calculation-ignoring-weekends-and-holidays\\\/\",\"name\":\"Dates calculation ignoring weekends and holidays - TeamDesk Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/dates-calculation-ignoring-weekends-and-holidays\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/dates-calculation-ignoring-weekends-and-holidays\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/02\\\/151.png\",\"datePublished\":\"2014-02-13T11:17:38+00:00\",\"dateModified\":\"2015-10-26T16:20:45+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/63bd8646f2f4720f503116e38a190a6e\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/dates-calculation-ignoring-weekends-and-holidays\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/dates-calculation-ignoring-weekends-and-holidays\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/dates-calculation-ignoring-weekends-and-holidays\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/02\\\/151.png\",\"contentUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/02\\\/151.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/dates-calculation-ignoring-weekends-and-holidays\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dates calculation ignoring weekends and holidays\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\",\"name\":\"TeamDesk Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/63bd8646f2f4720f503116e38a190a6e\",\"name\":\"Mila\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g\",\"caption\":\"Mila\"},\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/author\\\/mila\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dates calculation ignoring weekends and holidays - TeamDesk Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/","og_locale":"en_US","og_type":"article","og_title":"Dates calculation ignoring weekends and holidays - TeamDesk Blog","og_description":"Calculating future dates (such as exact due dates or project delivery dates) is a pretty common task. Let\u2019s find an easy way to calculate future dates in TeamDesk. The simplest way is to add a number of days to a date value. For example, the End Date is 5 days after the Start Date. You [&hellip;]","og_url":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/","og_site_name":"TeamDesk Blog","article_published_time":"2014-02-13T11:17:38+00:00","article_modified_time":"2015-10-26T16:20:45+00:00","og_image":[{"url":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/151.png","type":"","width":"","height":""}],"author":"Mila","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mila","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/#article","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/"},"author":{"name":"Mila","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/63bd8646f2f4720f503116e38a190a6e"},"headline":"Dates calculation ignoring weekends and holidays","datePublished":"2014-02-13T11:17:38+00:00","dateModified":"2015-10-26T16:20:45+00:00","mainEntityOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/"},"wordCount":213,"commentCount":0,"image":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/#primaryimage"},"thumbnailUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/151.png","articleSection":["Tips &amp; Tricks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/","url":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/","name":"Dates calculation ignoring weekends and holidays - TeamDesk Blog","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/#primaryimage"},"image":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/#primaryimage"},"thumbnailUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/151.png","datePublished":"2014-02-13T11:17:38+00:00","dateModified":"2015-10-26T16:20:45+00:00","author":{"@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/63bd8646f2f4720f503116e38a190a6e"},"breadcrumb":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/#primaryimage","url":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/151.png","contentUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2014\/02\/151.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/dates-calculation-ignoring-weekends-and-holidays\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.teamdesk.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Dates calculation ignoring weekends and holidays"}]},{"@type":"WebSite","@id":"https:\/\/www.teamdesk.net\/blog\/#website","url":"https:\/\/www.teamdesk.net\/blog\/","name":"TeamDesk Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.teamdesk.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/63bd8646f2f4720f503116e38a190a6e","name":"Mila","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g","caption":"Mila"},"url":"https:\/\/www.teamdesk.net\/blog\/author\/mila\/"}]}},"_links":{"self":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/comments?post=24"}],"version-history":[{"count":2,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/24\/revisions"}],"predecessor-version":[{"id":322,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/24\/revisions\/322"}],"wp:attachment":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/media?parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/categories?post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/tags?post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}