<?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: DateTime in Query Layer? in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/datetime-in-query-layer/m-p/811823#M3228</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What version of ArcGIS, both Desktop and enterprise geodatabase, are you using?&amp;nbsp; When you run the append, you say it works but makes all the values NULL?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 Jan 2019 13:31:28 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2019-01-13T13:31:28Z</dc:date>
    <item>
      <title>DateTime in Query Layer?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/datetime-in-query-layer/m-p/811820#M3225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I get a Query Layer to show DateTime for the data type instead of Date?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wanting to use a query layer to append to an SDE Feature class and if the format is Date, then the append process puts NULL instead of the Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried multiple ways in the SQL query in both ArcMap and ArcGIS but each time it shows as a Date Data Type in the Query Layer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This SQL query did not work,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-family: Consolas; font-size: small;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-family: Consolas; font-size: small;"&gt;CAST&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: Consolas; font-size: small;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-family: Consolas; font-size: small;"&gt;DATEADD&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: Consolas; font-size: small;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-family: Consolas; font-size: small;"&gt;second&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: Consolas; font-size: small;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-family: Consolas; font-size: small;"&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: Consolas; font-size: small;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-family: Consolas; font-size: small;"&gt;second&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: Consolas; font-size: small;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-family: Consolas; font-size: small;"&gt;GETDATE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: Consolas; font-size: small;"&gt;(),&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-family: Consolas; font-size: small;"&gt;GETUTCDATE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: Consolas; font-size: small;"&gt;()),&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; CreatedDate&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: Consolas; font-size: small;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;DateTime2&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: Consolas; font-size: small;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; CreatedDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/433114_date.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mele&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jan 2019 22:22:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/datetime-in-query-layer/m-p/811820#M3225</guid>
      <dc:creator>MeleKoneya</dc:creator>
      <dc:date>2019-01-12T22:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime in Query Layer?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/datetime-in-query-layer/m-p/811821#M3226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have to think about a solution a bit more, but the short answer is that you can't change the date data type because there is only one ArcGIS date date type:&amp;nbsp; &lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/manage-data/geodatabases/arcgis-field-data-types.htm" title="http://desktop.arcgis.com/en/arcmap/latest/manage-data/geodatabases/arcgis-field-data-types.htm"&gt;ArcGIS field data types—ArcGIS Help | ArcGIS Desktop&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What DBMS are you using and how are you trying to append the records?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jan 2019 23:14:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/datetime-in-query-layer/m-p/811821#M3226</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-01-12T23:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime in Query Layer?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/datetime-in-query-layer/m-p/811822#M3227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joshua - Thanks for reply.&amp;nbsp; &amp;nbsp; &amp;nbsp; I am using SQL Server 2012 and am using the Append Tool in ArcGIS for the append.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am trying to do is take a SQL view that has a Geometry field. and a DateTime field and convert the DateTime values to UTC for use in an Operations Dashboard.&amp;nbsp; &amp;nbsp; I created a Query Layer and within it used DateAdd in SQL to convert to UTC.&amp;nbsp; &amp;nbsp; From there I was going to save the Query Layer to an .lyr,&amp;nbsp; but if I look at the Data Type of the .lyr in ArcMap,&amp;nbsp; it is a Date and not DateTime as defined in SDE Feature Class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mele&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jan 2019 00:13:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/datetime-in-query-layer/m-p/811822#M3227</guid>
      <dc:creator>MeleKoneya</dc:creator>
      <dc:date>2019-01-13T00:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime in Query Layer?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/datetime-in-query-layer/m-p/811823#M3228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What version of ArcGIS, both Desktop and enterprise geodatabase, are you using?&amp;nbsp; When you run the append, you say it works but makes all the values NULL?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Jan 2019 13:31:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/datetime-in-query-layer/m-p/811823#M3228</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-01-13T13:31:28Z</dc:date>
    </item>
  </channel>
</rss>

