{"id":5727,"date":"2022-02-24T10:22:31","date_gmt":"2022-02-24T15:22:31","guid":{"rendered":"https:\/\/themespress.ca\/?p=5727"},"modified":"2022-03-24T08:10:50","modified_gmt":"2022-03-24T12:10:50","slug":"calculate-the-number-of-days-between-two-dates","status":"publish","type":"post","link":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/","title":{"rendered":"Calculate the Number of Days between Two Dates"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><div class=\"vc_row wpb_row vc_row-fluid\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>With this tutorial, we will show you how to calculate the number of days between two dates. And with our example, We will also see an example of mathematical calculation with a <a href=\"https:\/\/shareasale.com\/r.cfm?b=841990&amp;u=1476870&amp;m=64739&amp;urllink=&amp;afftrack=\"><strong>Formidable form<\/strong><\/a> shortcode.<\/p>\n<p>Let&#8217;s create a shortcode to calculate the number of days.<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<h2 style=\"text-align: left\" class=\"vc_custom_heading vc_do_custom_heading\" >Calculate the number of days between two dates<\/h2><div id=\"ts-enlighterjs-container-4888366\" class=\"ts-enlighterjs-container-single-enabled  \" style=\"width: 100%;  margin-top: 0px; margin-bottom: 0px;\" data-enlighter-doubleclick=\"true\" data-enlighter-windowbutton=\"true\" data-enlighter-windowtext=\"New Window\" data-enlighter-rawbutton=\"true\" data-enlighter-rawtext=\"RAW Code\" data-enlighter-infobutton=\"false\" data-enlighter-infotext=\"EnlighterJS\" data-enlighter-indent=\"2\"><pre id=\"ts-enlighterjs-pre-4888366\" class=\"\" style=\"white-space: pre-wrap; height: 100%; margin: 0; padding: 0;\" data-enlighter-language=\"standard\" data-enlighter-theme=\"enlighter\" data-enlighter-group=\"\" data-enlighter-title=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"1\" data-enlighter-highlight=\"\">function themespress_numberdays_shortcode() { \n     $now = time(); \/\/ Current time \n     $your_date = strtotime(&#039;2022-01-23&#039;); \/\/ The first date\n     $datediff = abs($now - $your_date); \/\/ Gives absolute Value \n     return floor($datediff\/(60*60*24)); \/\/ Returns the lowest value by rounding down value \n} \n\/\/ register shortcode\nadd_shortcode(&#039;numberdays&#039;, &#039;themespress_numberdays_shortcode&#039;); <\/pre><\/div>\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p><strong>Our date &#8216;<span class=\"st0\">2022-01-23&#8242;<\/span> <\/strong> will be the start date and the variable <strong>$now<\/strong> represents the current time. Afterwards, we need to <strong>calculate the number of days between two dates.<\/strong><\/p>\n\n\t\t<\/div>\n\t<\/div>\n<div class=\"vc_row wpb_row vc_inner vc_row-fluid\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>We can do calculations and statistics with the following Formidable Form shortcode:<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><\/div><div id=\"ts-enlighterjs-container-8959718\" class=\"ts-enlighterjs-container-single-enabled  \" style=\"width: 100%;  margin-top: 0px; margin-bottom: 0px;\" data-enlighter-doubleclick=\"true\" data-enlighter-windowbutton=\"true\" data-enlighter-windowtext=\"New Window\" data-enlighter-rawbutton=\"true\" data-enlighter-rawtext=\"RAW Code\" data-enlighter-infobutton=\"false\" data-enlighter-infotext=\"EnlighterJS\" data-enlighter-indent=\"2\"><pre id=\"ts-enlighterjs-pre-8959718\" class=\"\" style=\"white-space: pre-wrap; height: 100%; margin: 0; padding: 0;\" data-enlighter-language=\"standard\" data-enlighter-theme=\"enlighter\" data-enlighter-group=\"\" data-enlighter-title=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"1\" data-enlighter-highlight=\"\">[frm-math][\/frm-math]<\/pre><\/div>\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>With this mathematical shortcode, we will insert the data to calculate. For example, we want to calculate the daily grocery expenses between two dates.<\/p>\n<p>For example, you can create a Formidable Form to include grocery expenses.<\/p>\n<p>Form fields:<\/p>\n<p>1 &#8211; A hidden field with the default value of the date where the entry was created [date]<\/p>\n<p>2 &#8211; Select Options field with various grocery stores (Ex: Costco, Walmart, etc&#8230;)<\/p>\n<p>3 &#8211; A number field with the amount<\/p>\n\n\t\t<\/div>\n\t<\/div>\n\n\t<div  class=\"wpb_single_image wpb_content_element vc_align_left wpb_content_element\">\n\t\t\n\t\t<figure class=\"wpb_wrapper vc_figure\">\n\t\t\t<div class=\"vc_single_image-wrapper   vc_box_border_grey\"><img decoding=\"async\" width=\"1434\" height=\"541\" src=\"https:\/\/themespress.ca\/wp-content\/uploads\/2022\/02\/Formidable-Form-Exemple-formulaire.png\" class=\"vc_single_image-img attachment-full\" alt=\"Formidable Form - Exemple formulaire\" title=\"Formidable Form - Exemple formulaire\" srcset=\"https:\/\/themespress.ca\/wp-content\/uploads\/2022\/02\/Formidable-Form-Exemple-formulaire.png 1434w, https:\/\/themespress.ca\/wp-content\/uploads\/2022\/02\/Formidable-Form-Exemple-formulaire-600x226.png 600w, https:\/\/themespress.ca\/wp-content\/uploads\/2022\/02\/Formidable-Form-Exemple-formulaire-300x113.png 300w, https:\/\/themespress.ca\/wp-content\/uploads\/2022\/02\/Formidable-Form-Exemple-formulaire-1024x386.png 1024w, https:\/\/themespress.ca\/wp-content\/uploads\/2022\/02\/Formidable-Form-Exemple-formulaire-768x290.png 768w, https:\/\/themespress.ca\/wp-content\/uploads\/2022\/02\/Formidable-Form-Exemple-formulaire-1320x498.png 1320w\" sizes=\"(max-width: 1434px) 100vw, 1434px\" \/><\/div>\n\t\t<\/figure>\n\t<\/div>\n\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p> After adding some data, you can proceed with the calculation with two shortcodes:<\/p>\n<p>1 &#8211; We want to obtain the amount total (with entry ID) that will be the ID of my amount field.<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<div id=\"ts-enlighterjs-container-8209370\" class=\"ts-enlighterjs-container-single-enabled  \" style=\"width: 100%;  margin-top: 0px; margin-bottom: 0px;\" data-enlighter-doubleclick=\"true\" data-enlighter-windowbutton=\"true\" data-enlighter-windowtext=\"New Window\" data-enlighter-rawbutton=\"true\" data-enlighter-rawtext=\"RAW Code\" data-enlighter-infobutton=\"false\" data-enlighter-infotext=\"EnlighterJS\" data-enlighter-indent=\"2\"><pre id=\"ts-enlighterjs-pre-8209370\" class=\"\" style=\"white-space: pre-wrap; height: 100%; margin: 0; padding: 0;\" data-enlighter-language=\"standard\" data-enlighter-theme=\"enlighter\" data-enlighter-group=\"\" data-enlighter-title=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"1\" data-enlighter-highlight=\"\">\/\/ Remplacez 321 par l&#039;ID de votre entr&eacute;e montant.\n[frm-stats id=321 type=total]<\/pre><\/div>\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>2 &#8211; The shortcode for which calculates the number of days with the function created above. [numberdays].<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<div id=\"ts-enlighterjs-container-7183821\" class=\"ts-enlighterjs-container-single-enabled  \" style=\"width: 100%;  margin-top: 0px; margin-bottom: 0px;\" data-enlighter-doubleclick=\"true\" data-enlighter-windowbutton=\"true\" data-enlighter-windowtext=\"New Window\" data-enlighter-rawbutton=\"true\" data-enlighter-rawtext=\"RAW Code\" data-enlighter-infobutton=\"false\" data-enlighter-infotext=\"EnlighterJS\" data-enlighter-indent=\"2\"><pre id=\"ts-enlighterjs-pre-7183821\" class=\"\" style=\"white-space: pre-wrap; height: 100%; margin: 0; padding: 0;\" data-enlighter-language=\"standard\" data-enlighter-theme=\"enlighter\" data-enlighter-group=\"\" data-enlighter-title=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"1\" data-enlighter-highlight=\"\">\/\/ Fonction de notre calcul du nombre de jours.\n[numberdays]<\/pre><\/div>\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>Now, calculate the results on one of your pages:<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<div id=\"ts-enlighterjs-container-3613900\" class=\"ts-enlighterjs-container-single-enabled  \" style=\"width: 100%;  margin-top: 0px; margin-bottom: 0px;\" data-enlighter-doubleclick=\"true\" data-enlighter-windowbutton=\"true\" data-enlighter-windowtext=\"New Window\" data-enlighter-rawbutton=\"true\" data-enlighter-rawtext=\"RAW Code\" data-enlighter-infobutton=\"false\" data-enlighter-infotext=\"EnlighterJS\" data-enlighter-indent=\"2\"><pre id=\"ts-enlighterjs-pre-3613900\" class=\"\" style=\"white-space: pre-wrap; height: 100%; margin: 0; padding: 0;\" data-enlighter-language=\"standard\" data-enlighter-theme=\"enlighter\" data-enlighter-group=\"\" data-enlighter-title=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"1\" data-enlighter-highlight=\"\">\/\/ Remplacez 321 par l&#039;ID de votre entr&eacute;e montant.\n[frm-math][frm-stats id=321 type=total] \/ [numberdays][\/frm-math]<\/pre><\/div><div class=\"vc_row wpb_row vc_inner vc_row-fluid\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>With Formidable Form, you can generate charts to display your results.<\/p>\n\n\t\t<\/div>\n\t<\/div>\n\n\t<div  class=\"wpb_single_image wpb_content_element vc_align_left wpb_content_element\">\n\t\t\n\t\t<figure class=\"wpb_wrapper vc_figure\">\n\t\t\t<div class=\"vc_single_image-wrapper   vc_box_border_grey\"><img decoding=\"async\" width=\"900\" height=\"400\" src=\"https:\/\/themespress.ca\/wp-content\/uploads\/2022\/02\/Exemple-de-graphique-formidable-form.png\" class=\"vc_single_image-img attachment-full\" alt=\"Exemple de graphique formidable form\" title=\"Exemple de graphique formidable form\" srcset=\"https:\/\/themespress.ca\/wp-content\/uploads\/2022\/02\/Exemple-de-graphique-formidable-form.png 900w, https:\/\/themespress.ca\/wp-content\/uploads\/2022\/02\/Exemple-de-graphique-formidable-form-600x267.png 600w, https:\/\/themespress.ca\/wp-content\/uploads\/2022\/02\/Exemple-de-graphique-formidable-form-300x133.png 300w, https:\/\/themespress.ca\/wp-content\/uploads\/2022\/02\/Exemple-de-graphique-formidable-form-768x341.png 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/div>\n\t\t<\/figure>\n\t<\/div>\n<div id=\"ts-enlighterjs-container-7297157\" class=\"ts-enlighterjs-container-single-enabled  \" style=\"width: 100%;  margin-top: 0px; margin-bottom: 0px;\" data-enlighter-doubleclick=\"true\" data-enlighter-windowbutton=\"true\" data-enlighter-windowtext=\"New Window\" data-enlighter-rawbutton=\"true\" data-enlighter-rawtext=\"RAW Code\" data-enlighter-infobutton=\"false\" data-enlighter-infotext=\"EnlighterJS\" data-enlighter-indent=\"2\"><pre id=\"ts-enlighterjs-pre-7297157\" class=\"\" style=\"white-space: pre-wrap; height: 100%; margin: 0; padding: 0;\" data-enlighter-language=\"standard\" data-enlighter-theme=\"enlighter\" data-enlighter-group=\"\" data-enlighter-title=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"1\" data-enlighter-highlight=\"\">\/\/ Remplacez 320 par l&#039;ID du champ select options des supermarch&eacute;s\n[frm-graph fields=&quot;320&quot; type=&quot;column&quot; data_type=&quot;total&quot;]<\/pre><\/div>\n\t<div class=\"wpb_raw_code wpb_raw_html wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<a class=\"read-more\" href=\"https:\/\/formidableforms.com\/knowledgebase\/graphs\/\">Les graphiques Formidable Form<\/a>\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"With this tutorial, we will show you how to calculate the number of days between two dates. And with our example, We will also see an example of mathematical calculation<div class=\"read-more\"><a class=\"btn button-secondary\" href=\"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/\">Read More<\/a><\/div>","protected":false},"author":81,"featured_media":5728,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[283],"tags":[351],"class_list":["post-5727","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-forms"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Share the post &quot;Calculate the Number of Days between Two Dates&quot; Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky With this tutorial, we will show you how to calculate the number of days between two dates. And with our example, We will also see an example of mathematical calculation with a Formidable form shortcode.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Daniel\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Themespress - Des tutoriels et ressources WordPress\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Calculate the Number of Days between Two Dates - Themespress\" \/>\n\t\t<meta property=\"og:description\" content=\"Share the post &quot;Calculate the Number of Days between Two Dates&quot; Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky With this tutorial, we will show you how to calculate the number of days between two dates. And with our example, We will also see an example of mathematical calculation with a Formidable form shortcode.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-02-24T15:22:31-05:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-03-24T12:10:50-04:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Calculate the Number of Days between Two Dates - Themespress\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Share the post &quot;Calculate the Number of Days between Two Dates&quot; Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky With this tutorial, we will show you how to calculate the number of days between two dates. And with our example, We will also see an example of mathematical calculation with a Formidable form shortcode.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/calculate-the-number-of-days-between-two-dates\\\/#blogposting\",\"name\":\"Calculate the Number of Days between Two Dates - Themespress\",\"headline\":\"Calculate the Number of Days between Two Dates\",\"author\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/author\\\/daniel\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/themespress.ca\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Calculate-Number-of-Days-between-Two-Dates.jpg\",\"width\":2560,\"height\":1920,\"caption\":\"Calculate the Number of Days between Two Dates\"},\"datePublished\":\"2022-02-24T10:22:31-05:00\",\"dateModified\":\"2022-03-24T08:10:50-04:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/calculate-the-number-of-days-between-two-dates\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/calculate-the-number-of-days-between-two-dates\\\/#webpage\"},\"articleSection\":\"Tutorials, Forms\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/calculate-the-number-of-days-between-two-dates\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/#listItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/themespress.ca\\\/en\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/categorie\\\/tutorials\\\/#listItem\",\"name\":\"Tutorials\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/categorie\\\/tutorials\\\/#listItem\",\"position\":2,\"name\":\"Tutorials\",\"item\":\"https:\\\/\\\/themespress.ca\\\/en\\\/categorie\\\/tutorials\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/calculate-the-number-of-days-between-two-dates\\\/#listItem\",\"name\":\"Calculate the Number of Days between Two Dates\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/#listItem\",\"name\":\"Accueil\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/calculate-the-number-of-days-between-two-dates\\\/#listItem\",\"position\":3,\"name\":\"Calculate the Number of Days between Two Dates\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/categorie\\\/tutorials\\\/#listItem\",\"name\":\"Tutorials\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/#organization\",\"name\":\"Themespress\",\"description\":\"Des tutoriels et ressources WordPress\",\"url\":\"https:\\\/\\\/themespress.ca\\\/en\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/author\\\/daniel\\\/#author\",\"url\":\"https:\\\/\\\/themespress.ca\\\/en\\\/author\\\/daniel\\\/\",\"name\":\"Daniel\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/calculate-the-number-of-days-between-two-dates\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/93cd2188e40b3289d305e88acb676eb8b84078e50e06f4eb38a0152903b34c9d?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Daniel\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/calculate-the-number-of-days-between-two-dates\\\/#webpage\",\"url\":\"https:\\\/\\\/themespress.ca\\\/en\\\/calculate-the-number-of-days-between-two-dates\\\/\",\"name\":\"Calculate the Number of Days between Two Dates - Themespress\",\"description\":\"Share the post \\\"Calculate the Number of Days between Two Dates\\\" Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky With this tutorial, we will show you how to calculate the number of days between two dates. And with our example, We will also see an example of mathematical calculation with a Formidable form shortcode.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/calculate-the-number-of-days-between-two-dates\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/author\\\/daniel\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/author\\\/daniel\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/themespress.ca\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Calculate-Number-of-Days-between-Two-Dates.jpg\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/calculate-the-number-of-days-between-two-dates\\\/#mainImage\",\"width\":2560,\"height\":1920,\"caption\":\"Calculate the Number of Days between Two Dates\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/calculate-the-number-of-days-between-two-dates\\\/#mainImage\"},\"datePublished\":\"2022-02-24T10:22:31-05:00\",\"dateModified\":\"2022-03-24T08:10:50-04:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/themespress.ca\\\/en\\\/\",\"name\":\"Themespress\",\"description\":\"Des tutoriels et ressources WordPress\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/themespress.ca\\\/en\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Calculate the Number of Days between Two Dates - Themespress","description":"Share the post \"Calculate the Number of Days between Two Dates\" Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky With this tutorial, we will show you how to calculate the number of days between two dates. And with our example, We will also see an example of mathematical calculation with a Formidable form shortcode.","canonical_url":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/#blogposting","name":"Calculate the Number of Days between Two Dates - Themespress","headline":"Calculate the Number of Days between Two Dates","author":{"@id":"https:\/\/themespress.ca\/en\/author\/daniel\/#author"},"publisher":{"@id":"https:\/\/themespress.ca\/en\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/themespress.ca\/wp-content\/uploads\/2022\/02\/Calculate-Number-of-Days-between-Two-Dates.jpg","width":2560,"height":1920,"caption":"Calculate the Number of Days between Two Dates"},"datePublished":"2022-02-24T10:22:31-05:00","dateModified":"2022-03-24T08:10:50-04:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/#webpage"},"isPartOf":{"@id":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/#webpage"},"articleSection":"Tutorials, Forms"},{"@type":"BreadcrumbList","@id":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/themespress.ca\/en\/#listItem","position":1,"name":"Accueil","item":"https:\/\/themespress.ca\/en\/","nextItem":{"@type":"ListItem","@id":"https:\/\/themespress.ca\/en\/categorie\/tutorials\/#listItem","name":"Tutorials"}},{"@type":"ListItem","@id":"https:\/\/themespress.ca\/en\/categorie\/tutorials\/#listItem","position":2,"name":"Tutorials","item":"https:\/\/themespress.ca\/en\/categorie\/tutorials\/","nextItem":{"@type":"ListItem","@id":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/#listItem","name":"Calculate the Number of Days between Two Dates"},"previousItem":{"@type":"ListItem","@id":"https:\/\/themespress.ca\/en\/#listItem","name":"Accueil"}},{"@type":"ListItem","@id":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/#listItem","position":3,"name":"Calculate the Number of Days between Two Dates","previousItem":{"@type":"ListItem","@id":"https:\/\/themespress.ca\/en\/categorie\/tutorials\/#listItem","name":"Tutorials"}}]},{"@type":"Organization","@id":"https:\/\/themespress.ca\/en\/#organization","name":"Themespress","description":"Des tutoriels et ressources WordPress","url":"https:\/\/themespress.ca\/en\/"},{"@type":"Person","@id":"https:\/\/themespress.ca\/en\/author\/daniel\/#author","url":"https:\/\/themespress.ca\/en\/author\/daniel\/","name":"Daniel","image":{"@type":"ImageObject","@id":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/93cd2188e40b3289d305e88acb676eb8b84078e50e06f4eb38a0152903b34c9d?s=96&d=mm&r=g","width":96,"height":96,"caption":"Daniel"}},{"@type":"WebPage","@id":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/#webpage","url":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/","name":"Calculate the Number of Days between Two Dates - Themespress","description":"Share the post \"Calculate the Number of Days between Two Dates\" Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky With this tutorial, we will show you how to calculate the number of days between two dates. And with our example, We will also see an example of mathematical calculation with a Formidable form shortcode.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/themespress.ca\/en\/#website"},"breadcrumb":{"@id":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/#breadcrumblist"},"author":{"@id":"https:\/\/themespress.ca\/en\/author\/daniel\/#author"},"creator":{"@id":"https:\/\/themespress.ca\/en\/author\/daniel\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/themespress.ca\/wp-content\/uploads\/2022\/02\/Calculate-Number-of-Days-between-Two-Dates.jpg","@id":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/#mainImage","width":2560,"height":1920,"caption":"Calculate the Number of Days between Two Dates"},"primaryImageOfPage":{"@id":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/#mainImage"},"datePublished":"2022-02-24T10:22:31-05:00","dateModified":"2022-03-24T08:10:50-04:00"},{"@type":"WebSite","@id":"https:\/\/themespress.ca\/en\/#website","url":"https:\/\/themespress.ca\/en\/","name":"Themespress","description":"Des tutoriels et ressources WordPress","inLanguage":"en-US","publisher":{"@id":"https:\/\/themespress.ca\/en\/#organization"}}]},"og:locale":"en_US","og:site_name":"Themespress - Des tutoriels et ressources WordPress","og:type":"article","og:title":"Calculate the Number of Days between Two Dates - Themespress","og:description":"Share the post &quot;Calculate the Number of Days between Two Dates&quot; Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky With this tutorial, we will show you how to calculate the number of days between two dates. And with our example, We will also see an example of mathematical calculation with a Formidable form shortcode.","og:url":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/","article:published_time":"2022-02-24T15:22:31-05:00","article:modified_time":"2022-03-24T12:10:50-04:00","twitter:card":"summary","twitter:title":"Calculate the Number of Days between Two Dates - Themespress","twitter:description":"Share the post &quot;Calculate the Number of Days between Two Dates&quot; Facebook LinkedIn Twitter Partager... E-mail Ajouter aux favoris Bluesky With this tutorial, we will show you how to calculate the number of days between two dates. And with our example, We will also see an example of mathematical calculation with a Formidable form shortcode."},"aioseo_meta_data":{"post_id":"5727","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"Article","defaultPostTypeGraph":""},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2022-02-25 18:02:31","updated":"2025-06-08 00:49:06","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/themespress.ca\/en\/\" title=\"Accueil\">Accueil<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/themespress.ca\/en\/categorie\/tutorials\/\" title=\"Tutorials\">Tutorials<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tCalculate the Number of Days between Two Dates\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Accueil","link":"https:\/\/themespress.ca\/en\/"},{"label":"Tutorials","link":"https:\/\/themespress.ca\/en\/categorie\/tutorials\/"},{"label":"Calculate the Number of Days between Two Dates","link":"https:\/\/themespress.ca\/en\/calculate-the-number-of-days-between-two-dates\/"}],"_links":{"self":[{"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/posts\/5727","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/users\/81"}],"replies":[{"embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/comments?post=5727"}],"version-history":[{"count":0,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/posts\/5727\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/media\/5728"}],"wp:attachment":[{"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/media?parent=5727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/categories?post=5727"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/tags?post=5727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}