<?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 Time Capture and calculation in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875464#M29130</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have the same question. I don't think this&amp;nbsp;has been answered yet, and we'd like to know if this is possible. Within our form, we want multiple timestamps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;when&amp;nbsp;we begin the survey, which is easy with now().&lt;/LI&gt;&lt;LI&gt;time&amp;nbsp;we begin to process an&amp;nbsp;animal&lt;/LI&gt;&lt;LI&gt;time we finish processing an animal&lt;/LI&gt;&lt;LI&gt;time we released the animal&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;If we enter now() in all four fields, the same time is populated. We'd like an easy way to update to the current time for fields 2 through 4 without our endusers needing to look at their watch and scroll to the new time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 14 Oct 2017 00:09:54 GMT</pubDate>
    <dc:creator>J_P_Montagne</dc:creator>
    <dc:date>2017-10-14T00:09:54Z</dc:date>
    <item>
      <title>Survey123 Time Capture and calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875460#M29126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am creating a form for use by field personnel to use during hydrant flushing. &amp;nbsp;Along with other data I want to capture how long the hydrant flushed. &amp;nbsp;I am thinking i can put two questions in my survey asking start time and end time. &amp;nbsp;I would like to auto populate this field with the current time when the hydrant is opened rather then when the survey is started, then again capture the time when the hydrant is closed. Can this be done or are my field guys going to have to dial in the times manually. &amp;nbsp;Then I need to calculate the duration of flush (this could be minutes to over an hour) so I can multiply by the flow rate to measure the water used during flushing. &amp;nbsp;Can this be done in Survey123 or will I need to do this on the back end. &amp;nbsp;Any help is appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 21:31:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875460#M29126</guid>
      <dc:creator>ChristopherMcClain</dc:creator>
      <dc:date>2017-01-27T21:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Time Capture and calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875461#M29127</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;&amp;nbsp;To set the default value of a time question to the current time, you can use the expression &lt;EM&gt;now().&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;You can also calculate the number of minutes or hours elapsed between two moments in time, right from your mobile device. You will find some information about this in the &lt;A href="https://community.esri.com/groups/survey123/blog/2016/04/17/dates-and-time-in-survey123-for-arcgis"&gt;https://community.esri.com/groups/survey123/blog/2016/04/17/dates-and-time-in-survey123-for-arcgis&lt;/A&gt;&amp;nbsp; blog post.&amp;nbsp; For example, you can calculate the time elapsed in minutes between two Date/Time objects by using this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;int(${TimeLunchEnds} - ${TimeLunchStarts}) div (1000*60)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The result of the calculation above can be shown to the user in the form or alternative be hidden from the user (but still stored in the database).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="danger" __jive_macro_name="alert" alert="danger" class="jive_text_macro jive_macro_alert" modifiedtitle="true"&gt;&lt;P&gt;As described in the blog post referenced, Date/Time calculations use EPOCH time (milliseconds since 1970). This is&amp;nbsp; the case for Survey123 for ArcGIS version 1.x&amp;nbsp;&amp;nbsp; We are currently working on version 2.0 where the time calculations will be done in Decimal Time. We&amp;nbsp; will write in depth about this change in a couple of&amp;nbsp; weeks.&amp;nbsp; If you happen to&amp;nbsp; build a calculation with Date/Time using EPOCH operations (as above) you will want to stay tuned for this change to Decimal Date in 2.0.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jan 2017 06:55:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875461#M29127</guid>
      <dc:creator>IsmaelChivite</dc:creator>
      <dc:date>2017-01-28T06:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Time Capture and calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875462#M29128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to auto calculate the number of minutes between the start and end fields of the survey? Essentially calculating the number of minutes were spent between the user opening the survey and completing the survey?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Mar 2017 18:33:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875462#M29128</guid>
      <dc:creator>EoinO_Neill</dc:creator>
      <dc:date>2017-03-30T18:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Time Capture and calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875463#M29129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eoin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you can create a calculate question that subtracts the start time from the end time. &amp;nbsp;Note that the results currently are milliseconds - the answer will need to be divided by 60*1000 (60 sec/min * 1000 ms/sec) to generate minutes. &amp;nbsp;Additionally, please note that we are planning to switch the behavior of date fields so that the results will be in days (and thus need to get multiplied by 24*60) in a post-2.0 release of Survey123.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Mar 2017 20:28:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875463#M29129</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2017-03-30T20:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Time Capture and calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875464#M29130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have the same question. I don't think this&amp;nbsp;has been answered yet, and we'd like to know if this is possible. Within our form, we want multiple timestamps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;when&amp;nbsp;we begin the survey, which is easy with now().&lt;/LI&gt;&lt;LI&gt;time&amp;nbsp;we begin to process an&amp;nbsp;animal&lt;/LI&gt;&lt;LI&gt;time we finish processing an animal&lt;/LI&gt;&lt;LI&gt;time we released the animal&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;If we enter now() in all four fields, the same time is populated. We'd like an easy way to update to the current time for fields 2 through 4 without our endusers needing to look at their watch and scroll to the new time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Oct 2017 00:09:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875464#M29130</guid>
      <dc:creator>J_P_Montagne</dc:creator>
      <dc:date>2017-10-14T00:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Time Capture and calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875465#M29131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi J.P.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The behavior of a question with a calculation of now() will be updated in 2.5 to allow recalculation to the current time (not just the time the form started).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 02:51:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875465#M29131</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2017-10-18T02:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Time Capture and calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875466#M29132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought I’d post this just in case it was of any use to others.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The latest Great Wall release has fixed the behaviour of now() so that it re-calculates. This means that if you clear a time field with now() in the calculation field and then return to enter a new value it will populate the field with the current time. Previously I think it would return the time when the form was first loaded.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For our purposes (and as has been mentioned by others in this and other threads) we wanted to take time stamps at particular points in the survey. Using the latest fix and select_one fields we’ve come up with one way you can essentially check a box and record the time when it happened.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What we did:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1) Create a select_one field in the survey (labelled something like ‘Take time now’) which has a single choice value with a name of ‘0’ (it can be labelled something more user-friendly).&lt;BR /&gt;2) Create a time field that you want to be populated with the current time at the desired point.&lt;BR /&gt;3) For that time field, under the calculation column, put in; now()+int(${TakeTimeNow’}) – i.e. you’re effectively adding zero to the current time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/394714_Now().JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Now when the select-one is checked the time is recorded. If you un-check and re-check the box it will update the time at the re-check, so people can amend things if they accidentally selected it too soon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There may well be other/neater ways of doing this, but it worked for us.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A big ‘thank you’ to everyone who worked on the latest release – the fixes are definitely appreciated here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jan 2018 13:36:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-time-capture-and-calculation/m-p/875466#M29132</guid>
      <dc:creator>ColinCampbell</dc:creator>
      <dc:date>2018-01-25T13:36:25Z</dc:date>
    </item>
  </channel>
</rss>

