<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Compare two dates without time in arcade in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/compare-two-dates-without-time-in-arcade/m-p/1212516#M47887</link>
    <description>&lt;P&gt;You can use &lt;A href="https://developers.arcgis.com/arcade/function-reference/text_functions/#text" target="_blank" rel="noopener"&gt;Text()&lt;/A&gt; to format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var d1 = Today()
var d2 = Now()

// Compare directly
Console(d1)
Console(d2)
Console("Dates are equal: " + (d1 == d2))

// Remove time and compare
var d1 = Date(Text(d1, "Y-MM-DD"))
var d2 = Date(Text(d2, "Y-MM-DD"))

Console(d1)
Console(d2)
Console("Dates are equal: " + (d1 == d2))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;2022-09-14T00:00:00+02:00
2022-09-14T18:04:23.078+02:00
Dates are equal: false&lt;BR /&gt;
2022-09-14T00:00:00+02:00
2022-09-14T00:00:00+02:00
Dates are equal: true&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Sep 2022 16:07:13 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2022-09-14T16:07:13Z</dc:date>
    <item>
      <title>Compare two dates without time in arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/compare-two-dates-without-time-in-arcade/m-p/1212489#M47883</link>
      <description>&lt;P&gt;I am sure this has to exist and be simple and even basic (at least I would think), but I can't seem to find information anywhere.&amp;nbsp; I want to use Arcade to compare two dates (without time; just month, day, year) to see if they match.&amp;nbsp; The problem is that these dates I am working with have time associated with them.&amp;nbsp; So they don't match because the time doesn't match. For this accomplishment, I do not care for the time, only the month, day and year part of the date in the comparison.&lt;BR /&gt;&lt;BR /&gt;I'm guessing it will be a conversion of those dates to a mmddyyyy only format within a variable, but I literally cannot find anything on how to accomplish this.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 15:37:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/compare-two-dates-without-time-in-arcade/m-p/1212489#M47883</guid>
      <dc:creator>MosquitoGIS</dc:creator>
      <dc:date>2022-09-14T15:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two dates without time in arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/compare-two-dates-without-time-in-arcade/m-p/1212516#M47887</link>
      <description>&lt;P&gt;You can use &lt;A href="https://developers.arcgis.com/arcade/function-reference/text_functions/#text" target="_blank" rel="noopener"&gt;Text()&lt;/A&gt; to format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var d1 = Today()
var d2 = Now()

// Compare directly
Console(d1)
Console(d2)
Console("Dates are equal: " + (d1 == d2))

// Remove time and compare
var d1 = Date(Text(d1, "Y-MM-DD"))
var d2 = Date(Text(d2, "Y-MM-DD"))

Console(d1)
Console(d2)
Console("Dates are equal: " + (d1 == d2))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;2022-09-14T00:00:00+02:00
2022-09-14T18:04:23.078+02:00
Dates are equal: false&lt;BR /&gt;
2022-09-14T00:00:00+02:00
2022-09-14T00:00:00+02:00
Dates are equal: true&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 16:07:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/compare-two-dates-without-time-in-arcade/m-p/1212516#M47887</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-09-14T16:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two dates without time in arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/compare-two-dates-without-time-in-arcade/m-p/1212540#M47890</link>
      <description>&lt;P&gt;Fantastic!&amp;nbsp; Thank you kindly!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 16:59:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/compare-two-dates-without-time-in-arcade/m-p/1212540#M47890</guid>
      <dc:creator>MosquitoGIS</dc:creator>
      <dc:date>2022-09-14T16:59:49Z</dc:date>
    </item>
  </channel>
</rss>

