<?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: Subtract Date and time in Alteryx Designer Desktop Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Subtract-Date-and-time/m-p/487577#M99208</link>
    <description>&lt;P&gt;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/122573"&gt;@Luukvb&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd first remove the milliseconds - you can use the formula tool with the below expression to do that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Replace([Max_to_shipment], Right([Max_to_shipment], 4), "")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once done, I'd convert the datetime string to a variable in the correct data type using the DateTime parse tool followed by a formula tool calculating the difference. Attached is an example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DateTimeDiff([Max_to_shipment_NEW],[Max_INV_Zero_Degree_NEW],"seconds")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&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="timediff.png" style="width: 999px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/85868i2DC43F5BD610DB0D/image-size/large?v=v2&amp;amp;px=999" role="button" title="timediff.png" alt="timediff.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Nov 2019 15:23:55 GMT</pubDate>
    <dc:creator>MichalM</dc:creator>
    <dc:date>2019-11-11T15:23:55Z</dc:date>
    <item>
      <title>Subtract Date and time</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Subtract-Date-and-time/m-p/487570#M99205</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem with substracting two dates/times. In the data a format with milliseconds has been used. I want to subtract [Max_INV_Zero_Degree] of [Max_to_shipment]. But the first problem I faced is transforming the string into&amp;nbsp; Can someone help me?&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 11 Nov 2019 15:06:26 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Subtract-Date-and-time/m-p/487570#M99205</guid>
      <dc:creator>Luukvb</dc:creator>
      <dc:date>2019-11-11T15:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract Date and time</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Subtract-Date-and-time/m-p/487577#M99208</link>
      <description>&lt;P&gt;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/122573"&gt;@Luukvb&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd first remove the milliseconds - you can use the formula tool with the below expression to do that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Replace([Max_to_shipment], Right([Max_to_shipment], 4), "")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once done, I'd convert the datetime string to a variable in the correct data type using the DateTime parse tool followed by a formula tool calculating the difference. Attached is an example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DateTimeDiff([Max_to_shipment_NEW],[Max_INV_Zero_Degree_NEW],"seconds")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&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="timediff.png" style="width: 999px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/85868i2DC43F5BD610DB0D/image-size/large?v=v2&amp;amp;px=999" role="button" title="timediff.png" alt="timediff.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 15:23:55 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Subtract-Date-and-time/m-p/487577#M99208</guid>
      <dc:creator>MichalM</dc:creator>
      <dc:date>2019-11-11T15:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract Date and time</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Subtract-Date-and-time/m-p/487584#M99211</link>
      <description>&lt;P&gt;It is working, thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 15:30:05 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Subtract-Date-and-time/m-p/487584#M99211</guid>
      <dc:creator>Luukvb</dc:creator>
      <dc:date>2019-11-11T15:30:05Z</dc:date>
    </item>
  </channel>
</rss>

