<?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: Survey123 Date Time Calculation in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-date-time-calculation/m-p/766036#M2534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is that date must be lower-case. &amp;nbsp;While the calculations look javascript-esque, it sin't actually javascript you're writing- there's an interpretation element in between.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That being said, there's a much simpler way to set up text fields for date colleciton&lt;/P&gt;&lt;TABLE width="1160"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59; background: #9BBB59;" width="156"&gt;type&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="156"&gt;name&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="260"&gt;label&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="196"&gt;default&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="196"&gt;calculation&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: .5pt solid #9BBB59; border-bottom: none; border-left: none; background: #9BBB59;" width="196"&gt;body::esri:inputMask&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;text&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;datetext&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;DateText&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: .5pt solid #9BBB59; border-bottom: none; border-left: none;"&gt;99/99/9999&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;text&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;timetext&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;TimeText&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: .5pt solid #9BBB59; border-bottom: none; border-left: none;"&gt;99:99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;text&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;utcoffset&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;UTC Offset&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;-07:00&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: .5pt solid #9BBB59; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;calculate&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;year&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;Year&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;substr(${datetext}, 6, 10)&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: .5pt solid #9BBB59; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;calculate&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;month&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;Month&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;substr(${datetext}, 3, 5)&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: .5pt solid #9BBB59; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;calculate&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;day&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;Day&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;substr(${datetext}, 0, 2)&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: .5pt solid #9BBB59; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;note&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;datestring&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;compiled string&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD colspan="13" style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;concat(string(${year}),'-',string(${day}),'-',string(${month}),'T',${timetext},':00', ${utcoffset})&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;dateTime&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;dateobj&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;the Date&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD colspan="13" style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;if(string-length(${datetext}) &amp;gt; 0 and string-length(${timetext}) &amp;gt; 0, date-time(${datestring}), null)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously, you can consolidate the steps being done (though in 2.4, you can specify that the intermediate fields won't submit)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Aug 2017 22:03:11 GMT</pubDate>
    <dc:creator>JamesTedrick</dc:creator>
    <dc:date>2017-08-25T22:03:11Z</dc:date>
    <item>
      <title>Survey123 Date Time Calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-date-time-calculation/m-p/766034#M2532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Most of our Survey123 forms do not require a time entry that is different than the current time. One particular survey does need a time manually entered and the time spinner is proving to be very disliked. I've been asked to come up with a way to enter time as an integer. I have a date field that defaults to today which is what we want, and then the time is entered as a single 24-Hr clock integer (12:15 AM = 0015 or 15, 3:59 PM = 1559). I have a constraint that checks if its a valid time. What I would like to do now is combine the date field with the integer and make a DateTime hidden field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constraint on time integer:&lt;/P&gt;&lt;P&gt;(round(${FishingStartTimeInt}-50,-2)&amp;lt;2400) and ((${FishingStartTimeInt}-(round(${FishingStartTimeInt}-50,-2)))&amp;lt;60)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the calculation I have this non-working code:&lt;/P&gt;&lt;P&gt;format-date(Date('1970-01-01') + int(${FishingStartDate})+int(((round(${FishingStartTimeInt}-50,-2))div100)*3600000)+int((${FishingStartTimeInt}-(round(${FishingStartTimeInt}-50,-2)))*60000),'%m/%d/%Y %H:%M')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the error cannot handle Date function. Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 19:09:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-date-time-calculation/m-p/766034#M2532</guid>
      <dc:creator>JohnBroecher</dc:creator>
      <dc:date>2017-08-24T19:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Date Time Calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-date-time-calculation/m-p/766035#M2533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tacking myself to this question as I have also received feedback from field staff who did not enjoy the time spinner and am interested in potential alternatives.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;SPAN style="font-size: 11pt;"&gt;I have entered three now and this method is very easy except for one thing. That spinning wheel for the time is awful.&amp;nbsp; It takes just as long to click on the time you visited a sight [sic]&amp;nbsp;as it does to fill out the entire form."&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 17:10:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-date-time-calculation/m-p/766035#M2533</guid>
      <dc:creator>RalphBeishline</dc:creator>
      <dc:date>2017-08-25T17:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Date Time Calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-date-time-calculation/m-p/766036#M2534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is that date must be lower-case. &amp;nbsp;While the calculations look javascript-esque, it sin't actually javascript you're writing- there's an interpretation element in between.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That being said, there's a much simpler way to set up text fields for date colleciton&lt;/P&gt;&lt;TABLE width="1160"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59; background: #9BBB59;" width="156"&gt;type&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="156"&gt;name&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="260"&gt;label&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="196"&gt;default&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="196"&gt;calculation&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: .5pt solid #9BBB59; border-bottom: none; border-left: none; background: #9BBB59;" width="196"&gt;body::esri:inputMask&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;text&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;datetext&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;DateText&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: .5pt solid #9BBB59; border-bottom: none; border-left: none;"&gt;99/99/9999&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;text&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;timetext&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;TimeText&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: .5pt solid #9BBB59; border-bottom: none; border-left: none;"&gt;99:99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;text&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;utcoffset&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;UTC Offset&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;-07:00&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: .5pt solid #9BBB59; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;calculate&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;year&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;Year&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;substr(${datetext}, 6, 10)&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: .5pt solid #9BBB59; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;calculate&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;month&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;Month&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;substr(${datetext}, 3, 5)&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: .5pt solid #9BBB59; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;calculate&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;day&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;Day&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;substr(${datetext}, 0, 2)&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: .5pt solid #9BBB59; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;note&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;datestring&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;compiled string&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD colspan="13" style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;concat(string(${year}),'-',string(${day}),'-',string(${month}),'T',${timetext},':00', ${utcoffset})&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;dateTime&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;dateobj&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;the Date&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD colspan="13" style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;if(string-length(${datetext}) &amp;gt; 0 and string-length(${timetext}) &amp;gt; 0, date-time(${datestring}), null)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously, you can consolidate the steps being done (though in 2.4, you can specify that the intermediate fields won't submit)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 22:03:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-date-time-calculation/m-p/766036#M2534</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2017-08-25T22:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Date Time Calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-date-time-calculation/m-p/766037#M2535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply James.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Collecting date and time as text seems to make the&amp;nbsp;full keyboard open instead of the number pad, and it would need a constraint to only accept valid dates/times. I am kind of set on collecting date as date and time as integer for this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the Date to lowercase and it allows publishing but it won't allow me to submit from the device. It gives a code 1000 string or binary data would be truncated. In connect when I view the data from 'Validate Input' it shows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;"FishingStartTime": "SyntaxError: Unexpected token `identifier' in expression: format-date(date('1970-01-01') +int( /Lakes_Creel_Survey/Interview/PartyInfo/FishingStartDate )+int(((round( /Lakes_Creel_Survey/Interview/PartyInfo/FishingStartTimeInt -50,-2))div100)*3600000)+int(( /Lakes_Creel_Survey/Interview/PartyInfo/FishingStartTimeInt -(round( /Lakes_Creel_Survey/Interview/PartyInfo/FishingStartTimeInt -50,-2)))*60000),'%m/%d/%Y %H:%M')",&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;probably don't need the&amp;nbsp;1970 date in there at all since it is interpreted as zero. I put it there hoping it would help the expression be evaluated as a date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 14:53:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-date-time-calculation/m-p/766037#M2535</guid>
      <dc:creator>JohnBroecher</dc:creator>
      <dc:date>2017-08-28T14:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Date Time Calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-date-time-calculation/m-p/766038#M2536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The format-date function should not be used - that's for generating a human-readable string from a date. &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 17:36:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-date-time-calculation/m-p/766038#M2536</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2017-08-28T17:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Date Time Calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-date-time-calculation/m-p/766039#M2537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thought I'd share what I'm going to try using. It allows&amp;nbsp;you to type the time as an integer, then it checks that its a valid time and stores it in a hidden field as a string in 00:00 format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2018 15:28:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-date-time-calculation/m-p/766039#M2537</guid>
      <dc:creator>JohnBroecher</dc:creator>
      <dc:date>2018-03-26T15:28:17Z</dc:date>
    </item>
  </channel>
</rss>

