<?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 Reference Mosaic Dataset Definition Query &amp;quot;This Month&amp;quot;, &amp;quot;Greater than 90 days ago&amp;quot; based on system date in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/reference-mosaic-dataset-definition-query-quot/m-p/1274419#M44488</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a couple of use cases where I would like to set up reference mosaic datasets that only contain data with an Acquistion date of "This Month" or "Greater than 90 days ago" and it automatically updates what is returned as the system date moves forward and into next month.&lt;/P&gt;&lt;P&gt;Is there a query syntax that can be applied to the reference mosaic dataset that will honor current system date to do this raster return?&lt;/P&gt;&lt;P&gt;Raster Mosaic dataset is stored in SQL SDE Geodatabase Version 10.8&lt;/P&gt;</description>
    <pubDate>Sun, 02 Apr 2023 03:43:40 GMT</pubDate>
    <dc:creator>GerberMatthew</dc:creator>
    <dc:date>2023-04-02T03:43:40Z</dc:date>
    <item>
      <title>Reference Mosaic Dataset Definition Query "This Month", "Greater than 90 days ago" based on system date</title>
      <link>https://community.esri.com/t5/data-management-questions/reference-mosaic-dataset-definition-query-quot/m-p/1274419#M44488</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a couple of use cases where I would like to set up reference mosaic datasets that only contain data with an Acquistion date of "This Month" or "Greater than 90 days ago" and it automatically updates what is returned as the system date moves forward and into next month.&lt;/P&gt;&lt;P&gt;Is there a query syntax that can be applied to the reference mosaic dataset that will honor current system date to do this raster return?&lt;/P&gt;&lt;P&gt;Raster Mosaic dataset is stored in SQL SDE Geodatabase Version 10.8&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2023 03:43:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/reference-mosaic-dataset-definition-query-quot/m-p/1274419#M44488</guid>
      <dc:creator>GerberMatthew</dc:creator>
      <dc:date>2023-04-02T03:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Reference Mosaic Dataset Definition Query "This Month", "Greater than 90 days ago" based on system date</title>
      <link>https://community.esri.com/t5/data-management-questions/reference-mosaic-dataset-definition-query-quot/m-p/1274422#M44489</link>
      <description>&lt;P&gt;The syntax will depend on the specific database management system being used. For SQL Server, you can use the GETDATE() function to get the current date and then use the DATEADD() function to subtract the appropriate number of days to get the desired date range. Here is an example SQL query:&lt;/P&gt;&lt;P&gt;SELECT * FROM mosaic_dataset&lt;BR /&gt;WHERE acquisition_date &amp;gt;= DATEADD(day, -90, GETDATE())&lt;/P&gt;&lt;P&gt;You can modify the number of days to get the desired date range for your use case.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2023 08:29:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/reference-mosaic-dataset-definition-query-quot/m-p/1274422#M44489</guid>
      <dc:creator>Omar_A</dc:creator>
      <dc:date>2023-04-02T08:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reference Mosaic Dataset Definition Query "This Month", "Greater than 90 days ago" based on system date</title>
      <link>https://community.esri.com/t5/data-management-questions/reference-mosaic-dataset-definition-query-quot/m-p/1274497#M44491</link>
      <description>&lt;P&gt;Can I get a validation/verification that this is the simplest syntax for the following 2 queries.&lt;/P&gt;&lt;P&gt;1)Get Current month captures only&lt;/P&gt;&lt;P&gt;eg.&amp;nbsp; Today is the 03/04/2023... so this should return any capture from the 01/04/2023&lt;/P&gt;&lt;P&gt;AcquisitionDate &amp;gt;= DATEADD(month, -1, (DATEADD(day, ((DATEPART (day, GETDATE()))*-1), GETDATE())))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)Get last month's captures only&lt;/P&gt;&lt;P&gt;eg.&amp;nbsp; Today is the 03/04/2023... so this should return any capture from the 01/03/2023 to the 31/03/2023&lt;/P&gt;&lt;P&gt;AcquisitionDate &amp;gt;= DATEADD(month, -1, (DATEADD(day, ((DATEPART (day, GETDATE()))*-1), GETDATE()))) AND AcquisitionDate &amp;lt;= DATEADD(day, ((DATEPART (day, GETDATE()))*-1), GETDATE())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feel like it could be simplified by calculating the values required to return this as a like statement to allow "AcquisitionDate LIKE '2023-04%'" AND "AcquisitionDate LIKE '2023-03%'" to be used.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 04:03:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/reference-mosaic-dataset-definition-query-quot/m-p/1274497#M44491</guid>
      <dc:creator>GerberMatthew</dc:creator>
      <dc:date>2023-04-03T04:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Reference Mosaic Dataset Definition Query "This Month", "Greater than 90 days ago" based on system date</title>
      <link>https://community.esri.com/t5/data-management-questions/reference-mosaic-dataset-definition-query-quot/m-p/1274687#M44493</link>
      <description>&lt;P&gt;It is possible to use a LIKE statement to retrieve any capture from a specific month, but this approach may not be as efficient as using the DATEADD function. Also, using LIKE statements would not work for the second query, as it needs to retrieve captures within a specific date range.&lt;/P&gt;&lt;P&gt;thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 14:20:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/reference-mosaic-dataset-definition-query-quot/m-p/1274687#M44493</guid>
      <dc:creator>Omar_A</dc:creator>
      <dc:date>2023-04-03T14:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reference Mosaic Dataset Definition Query "This Month", "Greater than 90 days ago" based on system date</title>
      <link>https://community.esri.com/t5/data-management-questions/reference-mosaic-dataset-definition-query-quot/m-p/1275030#M44494</link>
      <description>&lt;P&gt;Thanks...&amp;nbsp; I did suspect the LIKE would be less efficient as I assumed the only way to do it would be to get the values of current date out as char/strings, do the similar math and then build the variable.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 22:48:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/reference-mosaic-dataset-definition-query-quot/m-p/1275030#M44494</guid>
      <dc:creator>GerberMatthew</dc:creator>
      <dc:date>2023-04-03T22:48:15Z</dc:date>
    </item>
  </channel>
</rss>

