<?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: Converting time using Power Automate and Survey123 in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1345150#M52653</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2929"&gt;@IsmaelChivite&lt;/a&gt;, I've followed your instructions but my conversion is failing using the code. Following your exact instructions are insert the following code but then showing as an invalid code. Any changes to this process or pointer for what I am doing incorrectly?&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;addSeconds('1970-1-1',Div(triggerBody()?['body/feature/attributes/submissionDate'],1000,'yyyy-MM-dd'))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 02 Nov 2023 18:07:00 GMT</pubDate>
    <dc:creator>RutledgeNicholas</dc:creator>
    <dc:date>2023-11-02T18:07:00Z</dc:date>
    <item>
      <title>Converting time using Power Automate and Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1020970#M32155</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using Power Automate to send a confirmation email when a survey is submitted. I have a dateTime field within my survey and I am interested in converting the time to be understandable within an email. As I understand it the survey contains the date/time in Epoch time. I found an article explaining how to perform this conversion but I seem to be doing something wrong, because the Power Automate process throws an error on my expression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link to the conversion article -&amp;nbsp;&lt;A href="https://support.esri.com/en/technical-article/000023954" target="_blank" rel="noopener"&gt;https://support.esri.com/en/technical-article/000023954&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And here is my expression -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;addSeconds(&lt;/SPAN&gt;&lt;SPAN&gt;'1970-1-1', Div(triggerBody()?['feature']?['attributes']?['&lt;/SPAN&gt;&lt;SPAN&gt;datetime&lt;/SPAN&gt;&lt;SPAN&gt;'],1000)&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone has done this conversion before and has information it would be appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 14:20:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1020970#M32155</guid>
      <dc:creator>DaveK</dc:creator>
      <dc:date>2021-01-28T14:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Converting time using Power Automate and Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1021207#M32174</link>
      <description>&lt;P&gt;I think you are just missing the format string at the end.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In Power Automate, click on the body input box of your email action&lt;/LI&gt;&lt;LI&gt;Select Dynamic Content&lt;/LI&gt;&lt;LI&gt;Switch to the Expression tab&lt;/LI&gt;&lt;LI&gt;Type &lt;STRONG&gt;addSeconds('1970-1-1',Div(&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Then insert the date value from the survey (switching momentarily to dynamic content to select your date question in the survey).&lt;/LI&gt;&lt;LI&gt;Your expression will look something like this: &lt;STRONG&gt;addSeconds('1970-1-1',Div(triggerBody()?['feature']?['attributes']?['yourdatequestion']&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Now add &lt;STRONG&gt;,1000),'yyyy-MM-dd')&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Your final expression will be something like this&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;addSeconds('1970-1-1',Div(triggerBody()?['feature']?['attributes']?['yourdatequestion'] ,1000),'yyyy-MM-dd')&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 19:49:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1021207#M32174</guid>
      <dc:creator>IsmaelChivite</dc:creator>
      <dc:date>2021-01-28T19:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Converting time using Power Automate and Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1184452#M43342</link>
      <description>&lt;P&gt;Hi Ismael&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2929"&gt;@IsmaelChivite&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used your logic for the Date/Time and I don't get the correct time in the email. I created a test record set to&amp;nbsp; Dec 25, 2021 @1pm and the email was generated for Date as Dec 24, 2021&amp;nbsp;@7pm. any suggestions? Thank you!&lt;/P&gt;&lt;P&gt;Lacri&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 20:17:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1184452#M43342</guid>
      <dc:creator>Ursu_Lacramioara</dc:creator>
      <dc:date>2022-06-20T20:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Converting time using Power Automate and Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1320943#M51327</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/318190"&gt;@Ursu_Lacramioara&lt;/a&gt;&amp;nbsp; Date objects in an &lt;EM&gt;esriFieldTypeDate&lt;/EM&gt; column are stored in UTC. That explains the difference you see.&lt;/P&gt;&lt;P&gt;You can convert the time zone as shown in the diagram below. If you are using the Convert time zone module, you do not need to include the date format parameter in the &lt;EM&gt;addSeconds&lt;/EM&gt; operation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IsmaelChivite_0-1692654260751.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/78727i451A3A6F69F7920C/image-size/large?v=v2&amp;amp;px=999" role="button" title="IsmaelChivite_0-1692654260751.png" alt="IsmaelChivite_0-1692654260751.png" /&gt;&lt;/span&gt;&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>Mon, 21 Aug 2023 21:45:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1320943#M51327</guid>
      <dc:creator>IsmaelChivite</dc:creator>
      <dc:date>2023-08-21T21:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Converting time using Power Automate and Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1345150#M52653</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2929"&gt;@IsmaelChivite&lt;/a&gt;, I've followed your instructions but my conversion is failing using the code. Following your exact instructions are insert the following code but then showing as an invalid code. Any changes to this process or pointer for what I am doing incorrectly?&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;addSeconds('1970-1-1',Div(triggerBody()?['body/feature/attributes/submissionDate'],1000,'yyyy-MM-dd'))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 02 Nov 2023 18:07:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1345150#M52653</guid>
      <dc:creator>RutledgeNicholas</dc:creator>
      <dc:date>2023-11-02T18:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Converting time using Power Automate and Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1345551#M52669</link>
      <description>&lt;P&gt;I'm trying to convert my date to MM-DD-YYYY format and I've followed the instructions but my conversion is failing using the code. Following the exact instructions that are written and inserting the following code, but then showing as an invalid code. Any changes to this process or pointer for what I am doing incorrectly?&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;addSeconds('1970-1-1',Div(triggerBody()?['body/feature/attributes/submissionDate'],1000,'yyyy-MM-dd'))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 03 Nov 2023 15:06:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1345551#M52669</guid>
      <dc:creator>RutledgeNicholas</dc:creator>
      <dc:date>2023-11-03T15:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Converting time using Power Automate and Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1345567#M52671</link>
      <description>&lt;P&gt;Hi Nicholas - this is what i have in my flows for Add to Time:&lt;/P&gt;&lt;P&gt;Div(triggerOutputs()?['body/feature/attributes/SiteVisitDate'],1000)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ursu_Lacramioara_0-1699024445233.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84967iF48DCC4BC08E77FE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ursu_Lacramioara_0-1699024445233.png" alt="Ursu_Lacramioara_0-1699024445233.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 15:14:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1345567#M52671</guid>
      <dc:creator>Ursu_Lacramioara</dc:creator>
      <dc:date>2023-11-03T15:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Converting time using Power Automate and Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1345584#M52672</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/318190"&gt;@Ursu_Lacramioara&lt;/a&gt;&amp;nbsp;Thanks! This seem to have fixed my first issue. Since my Date field is a date only field, are you aware of any ways of getting the Thh:mm:ss:ms portion of the date field removed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 15:35:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1345584#M52672</guid>
      <dc:creator>RutledgeNicholas</dc:creator>
      <dc:date>2023-11-03T15:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Converting time using Power Automate and Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1345593#M52673</link>
      <description>&lt;P&gt;do you have this, where Calculated Time equals to body ('Add_to_time')&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ursu_Lacramioara_0-1699026131641.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84975i1008EB4B368663DF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ursu_Lacramioara_0-1699026131641.png" alt="Ursu_Lacramioara_0-1699026131641.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 15:43:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1345593#M52673</guid>
      <dc:creator>Ursu_Lacramioara</dc:creator>
      <dc:date>2023-11-03T15:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Converting time using Power Automate and Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1345604#M52674</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/318190"&gt;@Ursu_Lacramioara&lt;/a&gt;&amp;nbsp;This worked perfectly! Thank you!!!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="RutledgeNicholas_0-1699026735771.png" style="width: 332px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84979iD98F95B01D3EFDFD/image-size/large?v=v2&amp;amp;px=999" role="button" title="RutledgeNicholas_0-1699026735771.png" alt="RutledgeNicholas_0-1699026735771.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 15:53:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/converting-time-using-power-automate-and-survey123/m-p/1345604#M52674</guid>
      <dc:creator>RutledgeNicholas</dc:creator>
      <dc:date>2023-11-03T15:53:00Z</dc:date>
    </item>
  </channel>
</rss>

