<?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 format in HTML popups in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/datetime-format-in-html-popups/m-p/34313#M1231</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;bump&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Dec 2018 13:42:57 GMT</pubDate>
    <dc:creator>MTorres</dc:creator>
    <dc:date>2018-12-12T13:42:57Z</dc:date>
    <item>
      <title>Datetime format in HTML popups</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/datetime-format-in-html-popups/m-p/34312#M1230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;We have several map services with layers (created from SQL Server tables/views) that display datetime&amp;nbsp;fields. We also have HTML popups defined for many of them (table of visible fields).&amp;nbsp; The default format for date fields appears to be "M/dd/yyyy h:mm:ss tt", but&amp;nbsp;I would like to change it to "yyyy-MM-dd HH:mm:ss".&amp;nbsp; Is there a way to define a default format on the server, so that it will apply to all date field&lt;/SPAN&gt;&lt;SPAN&gt;s?&amp;nbsp; Or is there a way to specify the format in the MXD using ArcMap?&amp;nbsp; Things I have already tried or thought about:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;Changed the source query to reformat the fields using FORMAT([MyDatetimeField], N'yyyy-MM-dd HH:mm:ss'). That worked, but changed it to a text field, which had some unintended consequences in client applications, since they provide different options for text vs. date fields.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Used the CONVERT function in the SQL query to reformat the field *and* keep it as a SQL datetime type.&amp;nbsp; However, ArcGIS ended up reformatting it.&amp;nbsp; Seems like as long as it's a date field,&amp;nbsp;ArcGIS will change the format to its own&amp;nbsp;default.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Changed the datetime display settings on the Windows server using Control Panel.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;This changed the format within ArcMap but not in the published map service.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;I thought about formatting the HTML popup using XSLT, and using the format-dateTime function within that.&amp;nbsp; However, it looks like only XSLT 1.0 is supported and the date/time format functions need 2.0.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;We could put code in the client applications to reformat datetime fields in the popups, but that defeats the purpose of defining the HTML popups on the server.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;While Googling, I did see some references to Field Configurations and the Production Mapping extension, but I currently don't have access to that.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It feel like there should be a simple way to do this, but I'm missing it.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;BR /&gt;Mike&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2018 21:10:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/datetime-format-in-html-popups/m-p/34312#M1230</guid>
      <dc:creator>MichaelLacy</dc:creator>
      <dc:date>2018-05-22T21:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Datetime format in HTML popups</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/datetime-format-in-html-popups/m-p/34313#M1231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;bump&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2018 13:42:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/datetime-format-in-html-popups/m-p/34313#M1231</guid>
      <dc:creator>MTorres</dc:creator>
      <dc:date>2018-12-12T13:42:57Z</dc:date>
    </item>
  </channel>
</rss>

