<?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: decimal-date-time validation issue in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/decimal-date-time-validation-issue/m-p/1117024#M38627</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1213"&gt;@JamesTedrick&lt;/a&gt;&amp;nbsp;-&lt;/P&gt;&lt;P&gt;I am having a similar issue...although with time instead of date. I have an existing survey XLSForm which is formatted like this...the calculation works perfectly. The number of minutes elapsed is returned.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="erica_tefft_1-1637007459323.png" style="width: 786px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27469i4951E3C74C945A3F/image-dimensions/786x57?v=v2" width="786" height="57" role="button" title="erica_tefft_1-1637007459323.png" alt="erica_tefft_1-1637007459323.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want to modify the survey to do some behind the scenes calculations so that field staff do not need to enter the colon (:) between hours and minutes. I've modified the XLSForm to this, and now my line 48, "Time_Elapsed" is throwing a type mismatch error. I can not figure out what I've done wrong as I feel like the results of line 43 (Interview_TimeColon) and line 47 (StartFishing_TimeColon) are not all that different from what was being input in lines 40 and 44 (e.g. 10:45 vs. 1045, which is then calculated to 10:45).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="erica_tefft_0-1637007343836.png" style="width: 787px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27468iC883616A4429B4ED/image-dimensions/787x109?v=v2" width="787" height="109" role="button" title="erica_tefft_0-1637007343836.png" alt="erica_tefft_0-1637007343836.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Do you have any suggestions? I did test what you show in the example XLS above, however it did not work - I continue to get a mismatch error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
    <pubDate>Fri, 26 Nov 2021 15:32:26 GMT</pubDate>
    <dc:creator>erica_poisson</dc:creator>
    <dc:date>2021-11-26T15:32:26Z</dc:date>
    <item>
      <title>decimal-date-time validation issue</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/decimal-date-time-validation-issue/m-p/1100645#M37407</link>
      <description>&lt;P&gt;The xlsform attached returns the following error in Connect (3.12 and 3.13):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OlivierDemars1_2-1632288953596.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/23586i79EA9B82C2A19E37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="OlivierDemars1_2-1632288953596.png" alt="OlivierDemars1_2-1632288953596.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The issue is with this calculation:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;decimal-date-time(${test_string})&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When replace with the calculation below, the xlsform is processed and works properly:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(string-length(${test_dob}) &amp;gt; 0&amp;nbsp;,decimal-date-time(${test_string}),0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Olivier&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, 22 Sep 2021 05:39:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/decimal-date-time-validation-issue/m-p/1100645#M37407</guid>
      <dc:creator>OlivierDemars1</dc:creator>
      <dc:date>2021-09-22T05:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: decimal-date-time validation issue</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/decimal-date-time-validation-issue/m-p/1100961#M37443</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/266722"&gt;@OlivierDemars1&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;The decimal-date-time() function is used for translating across decimal day (i.e. 1= 1 day) and date (epoch ms 1 = 1ms) formats.&amp;nbsp; Given your form, it appears you want the date() function (to parse a text string into a usable date) within a decimal-date-time function; that being said, there is a similar type mismatch error raised. That can be addressed with an intermediate function; see that attached example&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 19:10:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/decimal-date-time-validation-issue/m-p/1100961#M37443</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2021-09-22T19:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: decimal-date-time validation issue</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/decimal-date-time-validation-issue/m-p/1101110#M37471</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1213"&gt;@JamesTedrick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 03:13:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/decimal-date-time-validation-issue/m-p/1101110#M37471</guid>
      <dc:creator>OlivierDemars1</dc:creator>
      <dc:date>2021-09-23T03:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: decimal-date-time validation issue</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/decimal-date-time-validation-issue/m-p/1117024#M38627</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1213"&gt;@JamesTedrick&lt;/a&gt;&amp;nbsp;-&lt;/P&gt;&lt;P&gt;I am having a similar issue...although with time instead of date. I have an existing survey XLSForm which is formatted like this...the calculation works perfectly. The number of minutes elapsed is returned.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="erica_tefft_1-1637007459323.png" style="width: 786px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27469i4951E3C74C945A3F/image-dimensions/786x57?v=v2" width="786" height="57" role="button" title="erica_tefft_1-1637007459323.png" alt="erica_tefft_1-1637007459323.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want to modify the survey to do some behind the scenes calculations so that field staff do not need to enter the colon (:) between hours and minutes. I've modified the XLSForm to this, and now my line 48, "Time_Elapsed" is throwing a type mismatch error. I can not figure out what I've done wrong as I feel like the results of line 43 (Interview_TimeColon) and line 47 (StartFishing_TimeColon) are not all that different from what was being input in lines 40 and 44 (e.g. 10:45 vs. 1045, which is then calculated to 10:45).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="erica_tefft_0-1637007343836.png" style="width: 787px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27468iC883616A4429B4ED/image-dimensions/787x109?v=v2" width="787" height="109" role="button" title="erica_tefft_0-1637007343836.png" alt="erica_tefft_0-1637007343836.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Do you have any suggestions? I did test what you show in the example XLS above, however it did not work - I continue to get a mismatch error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 15:32:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/decimal-date-time-validation-issue/m-p/1117024#M38627</guid>
      <dc:creator>erica_poisson</dc:creator>
      <dc:date>2021-11-26T15:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: decimal-date-time validation issue</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/decimal-date-time-validation-issue/m-p/1123459#M39091</link>
      <description>&lt;P&gt;I resolved this using the original set of questions (first screen capture above) in conjunction with an input mask specified for lines 40 &amp;amp; 44.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Within the bind::esri:inputMask column, I specified 99:99.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This allows users to just enter numbers, the colon is automatically added and the 'Time Elapsed' calculation works perfectly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 17:59:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/decimal-date-time-validation-issue/m-p/1123459#M39091</guid>
      <dc:creator>erica_poisson</dc:creator>
      <dc:date>2021-12-07T17:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: decimal-date-time validation issue</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/decimal-date-time-validation-issue/m-p/1126967#M39325</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1213"&gt;@JamesTedrick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some issues with the calculation of dates in my Survey123 connect.&lt;/P&gt;&lt;P&gt;I'm trying to calculate the time (in days) between to dates field, but, I have the following error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HaroldHerrera1_1-1639687714831.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/29892i3D70C21D3FB1E99D/image-size/large?v=v2&amp;amp;px=999" role="button" title="HaroldHerrera1_1-1639687714831.png" alt="HaroldHerrera1_1-1639687714831.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The problem is caused for one field, type "&lt;STRONG&gt;Date&lt;/STRONG&gt;", Survey123 cannot convert this specific field in "decimal-date-time".&amp;nbsp;If I set the calculation with another date field, or calculate the field with,&amp;nbsp;&lt;SPAN&gt;UNIX epoch,&amp;nbsp;&lt;/SPAN&gt;works fine! I really don't know what's the problem.&lt;/P&gt;&lt;P&gt;Can I share the XLSForm to review this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 22:13:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/decimal-date-time-validation-issue/m-p/1126967#M39325</guid>
      <dc:creator>HaroldHerrera1</dc:creator>
      <dc:date>2021-12-16T22:13:47Z</dc:date>
    </item>
  </channel>
</rss>

