<?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: Exception from a shapefile whose .dbf contains a &amp;quot;Date&amp;quot; field in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186411#M2175</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good to hear that the problem has been addressed, thanks for your involvement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking forward to the 10.2.6 release.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jun 2015 16:12:07 GMT</pubDate>
    <dc:creator>WlodzimierzSzafran</dc:creator>
    <dc:date>2015-06-17T16:12:07Z</dc:date>
    <item>
      <title>Exception from a shapefile whose .dbf contains a "Date" field</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186406#M2170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I just encountered strange behaviour when trying to use a ShapefileTable from a shapefile that has at least one field of type "Date" among the attributes in its .dbf file. Any attempt to either get a count of the features or to iterate over the features ends in an exception:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"The added or subtracted value results in an un-representable DateTime. Parameter name: t"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steps to reproduce:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use any shapefile with at least one attribute of type "Date", with actual dates in the data, and then:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var shapefileTable = await ShapefileTable.OpenAsync(fileName);&lt;/P&gt;&lt;P&gt;var features = await shapefileTable.QueryAsync(new QueryFilter() { WhereClause = "1=1" });&lt;/P&gt;&lt;P&gt;if (features == null || features.Count() == 0)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // e.g. throw an exception&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The relevant stack trace:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; at System.DateTime.op_Addition(DateTime d, TimeSpan t)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; at Esri.ArcGISRuntime.Internal.DateUtils.FromMillisecondsSinceEpoch(Int64 milliSeconds)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; at Esri.ArcGISRuntime.Data.ArcGISFeatureTable.RowEnumerator.&amp;lt;System.Collections.Generic.IEnumerable&amp;lt;Esri.ArcGISRuntime.Data.GeodatabaseFeature&amp;gt;.GetEnumerator&amp;gt;d__48.MoveNext()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; at Esri.ArcGISRuntime.Data.ArcGISFeatureTable.RowEnumerator.&amp;lt;System.Collections.Generic.IEnumerable&amp;lt;Esri.ArcGISRuntime.Data.Feature&amp;gt;.GetEnumerator&amp;gt;d__4e.MoveNext()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate if this was acknowledged as an issue and fixed as soon as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2015 19:05:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186406#M2170</guid>
      <dc:creator>WlodzimierzSzafran</dc:creator>
      <dc:date>2015-06-13T19:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Exception from a shapefile whose .dbf contains a "Date" field</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186407#M2171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you upload a Shapefile we can test with?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 10:22:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186407#M2171</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2015-06-15T10:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Exception from a shapefile whose .dbf contains a "Date" field</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186408#M2172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;Could this be done outside of the forum? I'd like to pass a problematic file to you for testing but certainly wouldn't like to share it publicly. For example, I could give you a Dropbox link.&lt;/P&gt;&lt;P&gt;Thanks, regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 00:30:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186408#M2172</guid>
      <dc:creator>WlodzimierzSzafran</dc:creator>
      <dc:date>2015-06-16T00:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Exception from a shapefile whose .dbf contains a "Date" field</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186409#M2173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Absolutely - feel free to email me a link to download: &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:mbranscomb@esri.com"&gt;mbranscomb@esri.com&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 08:24:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186409#M2173</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2015-06-16T08:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Exception from a shapefile whose .dbf contains a "Date" field</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186410#M2174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good news: we have recently addressed this issue and I have verified against the latest build of the forthcoming 10.2.6 SDK. The problem was apparently null date values in the Shapefile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your example code now successfully reports the feature count (I added the MessageBox):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var shapefileTable = await ShapefileTable.OpenAsync(&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;fileName&lt;/SPAN&gt;);
var features = await shapefileTable.QueryAsync(new QueryFilter() { WhereClause = "1=1" });
if (features == null || features.Count() == 0)
{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // e.g. throw an exception
}
else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(features.Count().ToString());&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:26:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186410#M2174</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2021-12-11T09:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Exception from a shapefile whose .dbf contains a "Date" field</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186411#M2175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good to hear that the problem has been addressed, thanks for your involvement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking forward to the 10.2.6 release.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 16:12:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186411#M2175</guid>
      <dc:creator>WlodzimierzSzafran</dc:creator>
      <dc:date>2015-06-17T16:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Exception from a shapefile whose .dbf contains a "Date" field</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186412#M2176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are experiencing the same problem when loading an SQLite geodatabase (saved from ArcGIS Online) into a FeatureTable Source.&lt;/P&gt;&lt;P&gt;The feature table contains a Date Range domain. Do you have any idea about this problem ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The stack trace :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;Message : TimeSpan does not accept floating point Not-a-Number values.. Source : mscorlib. StackTrace : &lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&amp;nbsp; at System.TimeSpan.Interval(Double value, Int32 scale)&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&amp;nbsp; at Esri.ArcGISRuntime.Internal.DateUtils.FromMillisecondsSinceEpoch(Double milliSeconds)&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&amp;nbsp; at RuntimeCoreNet.BinaryReaderExtensions.ReadRowVariant(BinaryReader r, RowValueType type)&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&amp;nbsp; at RuntimeCoreNet.BinaryReaderExtensions.ReadRowVariant(BinaryReader r)&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&amp;nbsp; at RuntimeCoreNet.CoreFeatureSource.GetDomainInfo(String domainName)&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&amp;nbsp; at Esri.ArcGISRuntime.Data.FeatureTable.SetSource(CoreFeatureSource source)&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&amp;nbsp; at Esri.ArcGISRuntime.Data.GeodatabaseFeatureTable..ctor(CoreFeatureSource source, Geodatabase owner)&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&amp;nbsp; at Esri.ArcGISRuntime.Data.Geodatabase.&amp;lt;get_FeatureTables&amp;gt;d__0.MoveNext()&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&amp;nbsp; at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&amp;nbsp; at SOMaps.Manager.Offline.OfflineDataManager.&amp;lt;HasOfflineDataForLayerAsync&amp;gt;d__83.MoveNext()&lt;/P&gt;&lt;P class="p2"&gt;&lt;/P&gt;&lt;P class="p2"&gt;The Code:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Geodatabase&lt;/SPAN&gt; gdb &lt;SPAN class="s2"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;await&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;Geodatabase&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;.&lt;/SPAN&gt;OpenAsync(path);&lt;/P&gt;&lt;P class="p1"&gt;gdb&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;FeatureTables&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;Count()&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;I can share you the sqlite geodatabase if you need,&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;Thank you for your help,&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;Tony&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 10:45:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186412#M2176</guid>
      <dc:creator>TonyGeorges1</dc:creator>
      <dc:date>2016-01-18T10:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Exception from a shapefile whose .dbf contains a "Date" field</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186413#M2177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tony,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you provide simple reproducer for this issue so I can have a look what's going on?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2016 10:28:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/exception-from-a-shapefile-whose-dbf-contains-a/m-p/186413#M2177</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2016-01-21T10:28:49Z</dc:date>
    </item>
  </channel>
</rss>

