{"id":3744,"date":"2023-01-31T21:19:14","date_gmt":"2023-01-31T21:19:14","guid":{"rendered":"https:\/\/www.bizinfograph.com\/resource\/?p=3744"},"modified":"2024-04-19T21:28:19","modified_gmt":"2024-04-19T21:28:19","slug":"how-to-compare-two-dates-in-excel","status":"publish","type":"post","link":"https:\/\/www.bizinfograph.com\/resource\/how-to-compare-two-dates-in-excel\/","title":{"rendered":"How to Compare Two Dates in Excel? Compare Dates in Excel."},"content":{"rendered":"<p>Compare two dates in Excel to unlock a myriad of possibilities for time-based data analysis, tracking, and management. Whether you&#8217;re calculating the tenure of employees, determining the time between events, or comparing financial periods, understanding how to effectively compare dates is crucial. This guide will walk you through the various methods to compare two dates in Microsoft Excel, providing you with the tools to perform accurate calculations, set up conditional formatting, or even trigger alerts based on date comparisons. By mastering this functionality, you&#8217;ll enhance your ability to manage deadlines, analyze time-dependent data, and present temporal insights in a clear, actionable manner.<\/p>\n<p><strong>This Topic Covers:<\/strong><\/p>\n<ol>\n<li><a href=\"#how-to-compare-if-two-dates-are-equalor-not?\"><strong> How to compare two dates if dates are equal or not?<\/strong><\/a>\n<ul>\n<li><strong>\u00a0 \u00a0 \u00a0 Using (=) in a Formula to compare two dates<\/strong><\/li>\n<li><strong>\u00a0 \u00a0 \u00a0 Using IF function<\/strong><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#how-to-compare-if-a-date-is-greater-or-smaller?\"><strong> How to compare if a date is greater or smaller?<\/strong><\/a>\n<ul>\n<li><strong>\u00a0 \u00a0 \u00a0 Using (&lt;\/&gt;) in a formula<\/strong><\/li>\n<li><strong>\u00a0 \u00a0 \u00a0 Using IF function<\/strong><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#how-to-compare-dates-that-have-time-values?\"><strong> How to compare dates that have time values?<\/strong><\/a><\/li>\n<li><a href=\"#what-are-the-symbols-that-we-can-use-while-comparing-dates-in-excel?\"><strong> What are the symbols that we can use while comparing dates in Excel?<\/strong><\/a><\/li>\n<\/ol>\n<h2><strong id=\"how-to-compare-if-two-dates-are-equalor-not?\">1. How to compare two dates in Excel if dates are equal or not with another date?<\/strong><\/h2>\n<p>Below is a dataset that has two sets of dates in two columns. Using a few simple and easy formulas you can check if these two dates are the same or not.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-3745\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-1.png\" alt=\"Compare two dates (greater or less than)\" width=\"476\" height=\"284\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-1.png 476w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-1-300x179.png 300w\" sizes=\"(max-width: 476px) 100vw, 476px\" \/><\/p>\n<h3><strong>1.1 Using (=) in a Formula to compare two dates in the cells<\/strong><\/h3>\n<p><strong>Step 1: <\/strong>Select cell C2 and insert the formula given below. Click <strong>Enter <\/strong>key.<\/p>\n<p><strong>=A2=B2<\/strong><\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-3746\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-2.png\" alt=\"Compare two dates (greater or less than) \" width=\"495\" height=\"319\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-2.png 495w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-2-300x193.png 300w\" sizes=\"(max-width: 495px) 100vw, 495px\" \/><\/p>\n<p><strong>Step 2: <\/strong>Drag C2 down to C8 to apply the formula in that whole column of this table. What this formula does is, it creates a comparison between the two dates and checks if the dates are equal or not. If equal then the cell will return <strong>TRUE<\/strong> and if the dates aren\u2019t equal it will return <strong>FALSE.<\/strong><\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-3747\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-3.png\" alt=\"Compare two dates (greater or less than)\" width=\"561\" height=\"302\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-3.png 561w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-3-300x161.png 300w\" sizes=\"(max-width: 561px) 100vw, 561px\" \/><\/p>\n<h3><strong>1.2 Using IF function<\/strong><\/h3>\n<p>If you don\u2019t want the result in TRUE or FALSE and want the cells to return a meaningful text then <strong>IF<\/strong> function is the solution.<\/p>\n<p><strong>Step 1: <\/strong>Enter the formula given below inside cell C2 and press <strong>Enter<\/strong> key.<\/p>\n<p><strong>=IF(A2=B2,&#8221;Equal&#8221;,&#8221;Not Equal&#8221;)<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3748\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-4.png\" alt=\"Compare two dates (greater or less than)\" width=\"627\" height=\"324\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-4.png 627w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-4-300x155.png 300w\" sizes=\"(max-width: 627px) 100vw, 627px\" \/><\/p>\n<p><strong>Step 2: <\/strong>Drag C2 down to C8. This formula just changes the<strong> TRUE<\/strong> and <strong>FALSE<\/strong> text into<strong> Equal<\/strong> and <strong>Not Equal<\/strong> by using the text strings attached inside the formula.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3749\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-5.png\" alt=\"Compare two dates (greater or less than)\" width=\"630\" height=\"305\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-5.png 630w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-5-300x145.png 300w\" sizes=\"(max-width: 630px) 100vw, 630px\" \/><\/p>\n<h2><strong id=\"how-to-compare-if-a-date-is-greater-or-smaller?\">2. How to compare if a date is greater or smaller?<\/strong><\/h2>\n<h3><strong>2.1 Using (&lt;\/&gt;) in a formula<\/strong><\/h3>\n<p>Follow the steps to check if Date 1 is greater <strong>( &gt; ) <\/strong>than Date 2 or not.<\/p>\n<p><strong>Step 1: <\/strong>Type the formula in C2 and click Enter.<\/p>\n<p><strong>=A2&gt;B2<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3750\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-6.png\" alt=\"Compare two dates (greater or less than)\" width=\"653\" height=\"289\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-6.png 653w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-6-300x133.png 300w\" sizes=\"(max-width: 653px) 100vw, 653px\" \/><\/p>\n<p><strong>Step 2: <\/strong>To insert the formula in the whole column just drag C2 down to C8. The cells will return <strong>TRUE<\/strong> if Date 1 is greater than Date 2, otherwise it will return <strong>FALSE.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3751\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-7.png\" alt=\"Compare two dates (greater or less than)\" width=\"656\" height=\"299\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-7.png 656w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-7-300x137.png 300w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/p>\n<p>Now to see if Date 1 is smaller <strong>( &lt; ) <\/strong>than Date 2 or not use the following step.<\/p>\n<p><strong>Step 3: <\/strong>Insert the following formula in D2&gt;&gt;click Enter&gt;&gt;drag the cell downwards. If Date 1 is smaller than Date 2, the cells will return <strong>TRUE<\/strong> otherwise <strong>FALSE.<\/strong><\/p>\n<p><strong>=A2&lt;B2<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3752\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-8.png\" alt=\"Compare two dates (greater or less than)\" width=\"629\" height=\"279\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-8.png 629w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-8-300x133.png 300w\" sizes=\"(max-width: 629px) 100vw, 629px\" \/><\/p>\n<h3><strong>2.2 Using IF function<\/strong><\/h3>\n<p>You can add your preferable text strings to both these formulas by wrapping them with <strong>IF <\/strong>function in Excel.<\/p>\n<p><strong>Step 1: <\/strong>Use this formula in column C to check if Date 1 (start date) is greater than or not (from Date 2: end date). The cells return <strong>Greater<\/strong> or <strong>Smaller<\/strong> according to the attached text strings.<\/p>\n<p><strong>=IF(A2&gt;B2,&#8221;Greater&#8221;,&#8221;Smaller&#8221;)<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3753\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-9.png\" alt=\"Compare two dates (greater or less than)\" width=\"648\" height=\"295\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-9.png 648w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-9-300x137.png 300w\" sizes=\"(max-width: 648px) 100vw, 648px\" \/><\/p>\n<p><strong>Step 2: <\/strong>This formula also works the same way as the previous one.<\/p>\n<p><strong>=IF(A2&lt;B2,&#8221;Greater&#8221;,&#8221;Smaller&#8221;)<\/strong><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3754\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-10.png\" alt=\"Compare two dates (greater or less than)\" width=\"579\" height=\"263\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-10.png 579w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-10-300x136.png 300w\" sizes=\"(max-width: 579px) 100vw, 579px\" \/><\/p>\n<h2><strong id=\"how-to-compare-dates-that-have-time-values?\">3. How to compare dates that have date and time values in date format?<\/strong><\/h2>\n<p>Sometimes we use a format in our cells that hide time values and only shows the dates. In such cases , while making a comparison between two dates we may find difficulties comparing the dates because hiding the time value confuses the excel formulas which leads to a <strong>FALSE <\/strong>result as you can see in the picture below. Cell C4 and C6 are returning <strong>FALSE <\/strong>though both Date 1 and Date 2 are the same dates. In this case, you can use the I<strong>NT <\/strong>formula to ensure that the day part of the date is being compared and the time part is being ignored.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3755\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-11.png\" alt=\"Compare two dates (greater or less than)\" width=\"531\" height=\"343\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-11.png 531w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-11-300x194.png 300w\" sizes=\"(max-width: 531px) 100vw, 531px\" \/><\/p>\n<p><strong>Step 1: <\/strong>Insert the following formula in cell C2 and hit <strong>Enter<\/strong>.<\/p>\n<p><strong>=INT(A2)=INT(B2)<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3756\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-12.png\" alt=\"Compare two dates (greater or less than)\" width=\"574\" height=\"348\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-12.png 574w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-12-300x182.png 300w\" sizes=\"(max-width: 574px) 100vw, 574px\" \/><\/p>\n<p><strong>Step 2: <\/strong>Drag C2 down to C8. See the results, C4 and C6 have returned <strong>TRUE<\/strong> instead of <strong>FALSE<\/strong> as the formula now ignored the time part.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3757\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-13.png\" alt=\"Compare two dates (greater or less than)\" width=\"600\" height=\"375\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-13.png 600w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2023\/01\/Compare-two-dates-greater-or-less-than-13-300x188.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<h2><strong id=\"what-are-the-symbols-that-we-can-use-while-comparing-dates-in-excel?\">4. What are the symbols that we can use when comparing dates in Excel?<\/strong><\/h2>\n<p>There are some symbols you can use while comparing two dates in Excel.<\/p>\n<ul>\n<li>Equal to (=)<\/li>\n<li>Not Equal to (&lt;&gt;)<\/li>\n<li>Greater Than (&gt;)<\/li>\n<li>Less Than (&lt;)<\/li>\n<li>Greater Than or Equal to (&gt;=)<\/li>\n<li>Less Than or Equal to (&lt;=)<\/li>\n<\/ul>\n<p>We can also subtract one date from another to get the number of days to see the difference in dates.<\/p>\n<p><strong>For ready-to-use Dashboard Templates:<\/strong><\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Finance\" target=\"_blank\" rel=\"noopener\">Financial Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Sales\" target=\"_blank\" rel=\"noopener\">Sales Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Human-Resource\" target=\"_blank\" rel=\"noopener\">HR Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.executiveknowledge.org\/dashboard-templates\/35\" target=\"_blank\" rel=\"noopener\">Data Visualization Charts<\/a><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Compare two dates in Excel to unlock a myriad of possibilities for time-based data analysis, tracking, and management. Whether you&#8217;re calculating the tenure of employees, determining the time between events, or comparing financial periods, understanding how to effectively compare dates is crucial. This guide will walk you through the various methods to compare two dates &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.bizinfograph.com\/resource\/how-to-compare-two-dates-in-excel\/\"> <span class=\"screen-reader-text\">How to Compare Two Dates in Excel? Compare Dates in Excel.<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[450],"tags":[452,451],"class_list":["post-3744","post","type-post","status-publish","format-standard","hentry","category-compare-two-dates","tag-compare-two-dates","tag-compare-two-dates-in-excel"],"_links":{"self":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/3744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/comments?post=3744"}],"version-history":[{"count":9,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/3744\/revisions"}],"predecessor-version":[{"id":9085,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/3744\/revisions\/9085"}],"wp:attachment":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/media?parent=3744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/categories?post=3744"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/tags?post=3744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}