<?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: Row.SetDate() throws exception in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/row-setdate-throws-exception/m-p/124952#M274</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The next release, sometime in the first half of 2012, includes a fix for this (NIM072876).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Dec 2011 15:29:36 GMT</pubDate>
    <dc:creator>LanceShipman</dc:creator>
    <dc:date>2011-12-16T15:29:36Z</dc:date>
    <item>
      <title>Row.SetDate() throws exception</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/row-setdate-throws-exception/m-p/124949#M271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've been utilizing the C# FileGDB API (VS2010) for one of our projects, and it appears that there may be an obscure bug involving the Row.SetDate() function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For most of the dates in our dataset, the SetDate() function works fine. However, for one of the dates in our set (12/23/2008 12:00 AM), it throws a FileGDBException with error code -2147467259. Below is an example code snippet that will throw an exception on my machine. Here, "DATE" is an esriFieldTypeDate.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
Row dateRow = table.CreateRowObject();
DateTime date = new DateTime(2008, 12, 23, 0, 0, 0, 0);
dateRow.SetDate("DATE", date);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In fact, if I try any dates in December 2008, (12/1/2008 through 12/31/2008) it will throw an exception. Dates in November 2008 and January 2009 work fine though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone else replicate this issue? Or is this isolated to my setup?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your assistance!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;John&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 23:15:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/row-setdate-throws-exception/m-p/124949#M271</guid>
      <dc:creator>JohnShiu</dc:creator>
      <dc:date>2011-12-06T23:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Row.SetDate() throws exception</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/row-setdate-throws-exception/m-p/124950#M272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm seeing a similar issue. If I use SetDate() with a date, and then use the ArcCatalog tool to look at the contents of the database, I see that it has added one month to the stored date. So if I store the date 2002-01-04, the ArcCatalog shows that 2002-02-04 is stored. If I try to store 2002-01-29, it will throw the aforementioned exception. If it really adds one month, then it will try to store 2002-02-29, which is an invalid date. That would also explain why no date in December can be stored.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This looks like the inverse of the bug I found here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forumsstg.arcgis.com/threads/39566-Date-fields-subtract-a-month-from-the-date-resulting-in-Exception"&gt;http://forumsstg.arcgis.com/threads/39566-Date-fields-subtract-a-month-from-the-date-resulting-in-Exception&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Leon&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2011 09:55:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/row-setdate-throws-exception/m-p/124950#M272</guid>
      <dc:creator>Leonvan_Daal</dc:creator>
      <dc:date>2011-12-16T09:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Row.SetDate() throws exception</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/row-setdate-throws-exception/m-p/124951#M273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks very much for pointing that bug out, Leon. In the meantime, I've just removed the date fields which weren't essential for our dataset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;John&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2011 12:45:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/row-setdate-throws-exception/m-p/124951#M273</guid>
      <dc:creator>JohnShiu</dc:creator>
      <dc:date>2011-12-16T12:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Row.SetDate() throws exception</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/row-setdate-throws-exception/m-p/124952#M274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The next release, sometime in the first half of 2012, includes a fix for this (NIM072876).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2011 15:29:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/row-setdate-throws-exception/m-p/124952#M274</guid>
      <dc:creator>LanceShipman</dc:creator>
      <dc:date>2011-12-16T15:29:36Z</dc:date>
    </item>
  </channel>
</rss>

