<?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: Parsing serial date field in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/parsing-serial-date-field/m-p/367818#M12654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Gord,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could use the following python function within the field calculator:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def date(field):
&amp;nbsp; seconds = (field - 25569) * 86400.0
&amp;nbsp; time = str(datetime.timedelta(seconds=seconds))
&amp;nbsp; return time.split(",")[1].split(".")[0]&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a screen shot. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]20365[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 17:04:21 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2021-12-11T17:04:21Z</dc:date>
    <item>
      <title>Parsing serial date field</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/parsing-serial-date-field/m-p/367817#M12653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have imported a shapefile that contains a serial date number that looks like this: 41256.260799 . I would like to create a new field that shows only the hour and second like this 06:33 . I've tried the available vb and python date functions, but nothing seems to work. Would I make my new field type text? Any help appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gord&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2013 13:17:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/parsing-serial-date-field/m-p/367817#M12653</guid>
      <dc:creator>GordDeVillers</dc:creator>
      <dc:date>2013-01-02T13:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing serial date field</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/parsing-serial-date-field/m-p/367818#M12654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Gord,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could use the following python function within the field calculator:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def date(field):
&amp;nbsp; seconds = (field - 25569) * 86400.0
&amp;nbsp; time = str(datetime.timedelta(seconds=seconds))
&amp;nbsp; return time.split(",")[1].split(".")[0]&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a screen shot. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]20365[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:04:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/parsing-serial-date-field/m-p/367818#M12654</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-11T17:04:21Z</dc:date>
    </item>
  </channel>
</rss>

