<?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: Dateformat in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1047838#M43244</link>
    <description>&lt;P&gt;Hey Dan,&lt;/P&gt;&lt;P&gt;you know, the Name is the Name of the field with the NO2 concentration. The last sentence i don`t understand. Please can you explain it a little bit more? What is (eg name[18:22]?&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;</description>
    <pubDate>Thu, 15 Apr 2021 20:52:02 GMT</pubDate>
    <dc:creator>A_n_d_r_e_a</dc:creator>
    <dc:date>2021-04-15T20:52:02Z</dc:date>
    <item>
      <title>Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1046447#M43224</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;i want to use Python to create a new date format.&lt;/P&gt;&lt;P&gt;I have found something on the website:&lt;/P&gt;&lt;PRE&gt;datetime.datetime(2000, 12, 31)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;!field1! + datetime.timedelta(days=100)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I want to try it with the both.&lt;/P&gt;&lt;P&gt;Does anybody know, where i should add it in the field calculator.&lt;/P&gt;&lt;P&gt;In the code block?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for my little informatic knowledge...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 16:48:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1046447#M43224</guid>
      <dc:creator>A_n_d_r_e_a</dc:creator>
      <dc:date>2021-04-13T16:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1046500#M43226</link>
      <description>&lt;P&gt;You could add it in the code block as a function, but it should work just fine in the normal window (just above the code block space).&lt;/P&gt;&lt;P&gt;You do already have a field where you're adding the 100 days to?&amp;nbsp; I'm not sure what you mean by 'new date format', and what is the 31 Dec 2000 for?&lt;/P&gt;&lt;P&gt;If you just want to play with the module, use an IDE or online compiler such as&amp;nbsp;&lt;A href="https://www.programiz.com/python-programming/online-compiler/" target="_blank"&gt;Online Python Compiler (Interpreter) (programiz.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;then try things such as:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import datetime

initial_datetime = datetime.datetime(2000, 12, 31)
time_delta = datetime.timedelta(days=100)

print(initial_datetime)
print(initial_datetime + time_delta)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 13 Apr 2021 18:02:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1046500#M43226</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-04-13T18:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1046576#M43230</link>
      <description>&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;my mean Problem starts by the default time setting in ArcGIS.&lt;/P&gt;&lt;P&gt;If i import my netCDF than the date is imported incorrect such as double. If i create a new field in a date format, the date begins just as by default 1899 and not like my original 2019.&lt;/P&gt;&lt;P&gt;So i want to calculate a new field to get to my original date which is 2019-01-01 to 2020-12-31.&lt;/P&gt;&lt;P&gt;That 31.Dec 2000 was just an example...&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 19:49:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1046576#M43230</guid>
      <dc:creator>A_n_d_r_e_a</dc:creator>
      <dc:date>2021-04-13T19:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1046635#M43232</link>
      <description>&lt;P&gt;...as you can see in the picture the imported netCDF and the date or "time" is shown up as double, i calculated a new field "Date" in date format with the time field, and its still not 2019...its still no the original date...&lt;/P&gt;&lt;P&gt;Thanks forward!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 20:52:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1046635#M43232</guid>
      <dc:creator>A_n_d_r_e_a</dc:creator>
      <dc:date>2021-04-13T20:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1046639#M43233</link>
      <description>&lt;P&gt;you should just be able to specify an exact date for all the rows in the correct format, such as&lt;/P&gt;&lt;P&gt;2019-01-01 00:00:00&lt;/P&gt;&lt;P&gt;However I can't really comment on NetCDF as I believe the temporal dimension is stored differently.&lt;/P&gt;&lt;P&gt;Hopefully there's some examples with the Make NetCDF Raster Layer tool and the dimension parameter.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 20:57:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1046639#M43233</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-04-13T20:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1046937#M43236</link>
      <description>&lt;P&gt;From your explanations I still have no idea what you want to do sorry, hopefully someone else can help.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 14:31:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1046937#M43236</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-04-14T14:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1047006#M43237</link>
      <description>&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;the thing is I choose from a satellite website some Data in netCDF Format. An I set the beginning of my time period on 2019-01-01. But instead of that it is shown up as a double value like you can see in the picture with a red border. And i want to have it like 2019-01-01. I uploaded a picture with my Problem.&lt;/P&gt;&lt;P&gt;Thanks forward!&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 15:20:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1047006#M43237</guid>
      <dc:creator>A_n_d_r_e_a</dc:creator>
      <dc:date>2021-04-14T15:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1047125#M43239</link>
      <description>&lt;P&gt;If your time column is "days" then read on&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;d = datetime.datetime(2019, 1, 1)  # your initial date at the top 
d
datetime.datetime(2019, 1, 1, 0, 0)

time_vals = [46, 47, 48, 49]  # -- using some of the values I saw in the "time" column

# ---- now pretend this is a field calculation
# ---- look at the output, this is what would appear as you go down the column
for val in time_vals:
    new_date = d + datetime.timedelta(days = val)
    print(new_date)
    
2019-02-16 00:00:00
2019-02-17 00:00:00
2019-02-18 00:00:00
2019-02-19 00:00:00&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the field calculator expression would be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;datetime.datetime(2019, 1, 1) + datetime.timedelta(days = !time!)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 17:10:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1047125#M43239</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-14T17:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1047341#M43240</link>
      <description>&lt;P&gt;Hey Dan,&lt;/P&gt;&lt;P&gt;many thanks for your effort.&lt;/P&gt;&lt;P&gt;That is also an options to calculat an field, but I think I found my solution for my multidimensional data.&lt;/P&gt;&lt;P&gt;I would ask you to check my solution.&lt;/P&gt;&lt;P&gt;I found my solution in the link on the page of ArcGIS...&lt;/P&gt;&lt;P&gt;&lt;A href="https://desktop.arcgis.com/en/arcmap/10.3/manage-data/raster-and-images/wkfl-create-a-multidimensional-mosaic-dataset-from-a-set-of-time-series-images.htm" target="_blank"&gt;https://desktop.arcgis.com/en/arcmap/10.3/manage-data/raster-and-images/wkfl-create-a-multidimensional-mosaic-dataset-from-a-set-of-time-series-images.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So i create a Variable Field, a Dimension Field with "StdTime". Now there is also a little Problem with understanding Python...&lt;/P&gt;&lt;P&gt;I uploaded a picture with a red mark, which doesnt fit to my date I think...if i put this inside the Code Block and click ok, its written there something with invalid parameter? So the date should retrieved but how which syntax?&lt;/P&gt;&lt;P&gt;Thanks forward!&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 23:29:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1047341#M43240</guid>
      <dc:creator>A_n_d_r_e_a</dc:creator>
      <dc:date>2021-04-14T23:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1047344#M43241</link>
      <description>&lt;P&gt;The codeblock isn't properly formatted in the link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def getDate(name):
    year = name[18:22]
    month = name[23:25]
    return time.strftime("/".join(["1", month, year]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now in your expression you have ....!Name!&amp;nbsp; is that the name of the field?&amp;nbsp; If not replace it with the name of the field you want to use&lt;/P&gt;&lt;P&gt;Also you might want to check or provide a sample of your field because the slicing needs to be checked (eg name[18:22]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 23:40:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1047344#M43241</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-14T23:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1047838#M43244</link>
      <description>&lt;P&gt;Hey Dan,&lt;/P&gt;&lt;P&gt;you know, the Name is the Name of the field with the NO2 concentration. The last sentence i don`t understand. Please can you explain it a little bit more? What is (eg name[18:22]?&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 20:52:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1047838#M43244</guid>
      <dc:creator>A_n_d_r_e_a</dc:creator>
      <dc:date>2021-04-15T20:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1047877#M43245</link>
      <description>&lt;P&gt;for the script to work the field has to contain the date information in it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't see that in your "name" field.&lt;/P&gt;&lt;P&gt;There are no numbers that represent the year or month.&lt;/P&gt;&lt;P&gt;I can't work off screen grabs of information to copy and paste to provide an example.&lt;/P&gt;&lt;P&gt;Nothing so far has helped.&amp;nbsp;Unless you have what is needed by the function, I have nothing further to add.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 22:18:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1047877#M43245</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-15T22:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1048190#M43252</link>
      <description>&lt;P&gt;Hey Dan,&lt;/P&gt;&lt;P&gt;ok now I get you. But what I don`t understand is...&lt;/P&gt;&lt;P&gt;&lt;SPAN class="usertext"&gt;year = name&lt;STRONG&gt;[18:22]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="usertext"&gt;month = name&lt;STRONG&gt;[23:25]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="usertext"&gt;what does these numbers mean?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="usertext"&gt;I can`t read it in the link.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="usertext"&gt;Thanks forward! &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="usertext"&gt;Greetings,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="usertext"&gt;Andrea&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 16:10:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1048190#M43252</guid>
      <dc:creator>A_n_d_r_e_a</dc:creator>
      <dc:date>2021-04-16T16:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1048247#M43254</link>
      <description>&lt;P&gt;the 18 to 22 characters in "name" are the year&lt;/P&gt;&lt;P&gt;the 23 to 25 characters in "name" are the month&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 18:17:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1048247#M43254</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-16T18:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1048325#M43255</link>
      <description>&lt;P&gt;Hey Dan,&lt;/P&gt;&lt;P&gt;thanks for the info...I just uploaded a picture. There you can see the Datum field an StdTime which I create. Both in Date format. On the right side there you can see the def getDate(Datum):&lt;/P&gt;&lt;P&gt;def getDate(Datum):&lt;BR /&gt;year = Datum[18:22]&lt;BR /&gt;month = Datum[23:25]&lt;BR /&gt;return time.strftime("/".join(["1", month, year]))&lt;/P&gt;&lt;P&gt;Is that right like this? Than there is also still the Problem to convert it to my orginial time from 2019-2020.&lt;/P&gt;&lt;P&gt;Thanks forward!&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 20:09:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1048325#M43255</guid>
      <dc:creator>A_n_d_r_e_a</dc:creator>
      <dc:date>2021-04-16T20:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1048344#M43256</link>
      <description>&lt;P&gt;have you tried the script Dan provided? it looks like it would work exactly as needed using your day integer values.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 20:55:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1048344#M43256</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-04-16T20:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1048528#M43262</link>
      <description>&lt;P&gt;Your "days" column in which type has it to be?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Apr 2021 11:54:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1048528#M43262</guid>
      <dc:creator>A_n_d_r_e_a</dc:creator>
      <dc:date>2021-04-18T11:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1048590#M43266</link>
      <description>&lt;P&gt;I just realized now that my &lt;STRONG&gt;date field&lt;/STRONG&gt; is a &lt;STRONG&gt;double type&lt;/STRONG&gt;, so it should be possible to use the toolbox "convert time field". I just opened the netCDF data with Panoply and the data is there in a 20190101 format and its written there als float type. Does that help? Of course I also have to keep attention to the locale. So I need a formate where I can use also with the time controller. So the best format would be JJJJ/MM/TT hh:mm:ss because I have data for every hour.&lt;/P&gt;&lt;P&gt;Here is the link where I get the information...&lt;/P&gt;&lt;P&gt;&lt;A href="https://desktop.arcgis.com/de/arcmap/latest/map/time/convert-string-or-numeric-time-values-into-date-format.htm" target="_blank"&gt;https://desktop.arcgis.com/de/arcmap/latest/map/time/convert-string-or-numeric-time-values-into-date-format.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/de/pro-app/latest/help/mapping/time/supported-field-formats.htm" target="_blank"&gt;https://pro.arcgis.com/de/pro-app/latest/help/mapping/time/supported-field-formats.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks forward!&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 00:07:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1048590#M43266</guid>
      <dc:creator>A_n_d_r_e_a</dc:creator>
      <dc:date>2021-04-19T00:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dateformat</title>
      <link>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1051031#M43279</link>
      <description>&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;can you please complete this script with a 24 hours loop? I searched everywhere for that but I can`t find...&lt;/P&gt;&lt;P&gt;So just like&lt;/P&gt;&lt;P&gt;2019-01-01 00:00:00&lt;/P&gt;&lt;P&gt;2019-01-01 01:00:00&lt;/P&gt;&lt;P&gt;2019-01-01 02:00:00&lt;/P&gt;&lt;P&gt;...and so on&lt;/P&gt;&lt;P&gt;End date should be 2020-12-31 23:00:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;</description>
      <pubDate>Sat, 24 Apr 2021 14:58:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/dateformat/m-p/1051031#M43279</guid>
      <dc:creator>A_n_d_r_e_a</dc:creator>
      <dc:date>2021-04-24T14:58:12Z</dc:date>
    </item>
  </channel>
</rss>

