<?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: Calculating # hours between dates in Alteryx Designer Desktop Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175520#M45501</link>
    <description>&lt;P&gt;@BenMoss&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Makes sense!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Okay so I ran it, however I am getting the error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"the formula resulted in a number but the field is a Date/Time. (Expression #1)."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know what this might be caused by?&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jun 2018 16:24:06 GMT</pubDate>
    <dc:creator>paigeblackstone</dc:creator>
    <dc:date>2018-06-20T16:24:06Z</dc:date>
    <item>
      <title>Calculating # hours between dates</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175494#M45491</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data set with two date columns, one being &lt;STRONG&gt;inquiry opened date&lt;/STRONG&gt; and the other being &lt;STRONG&gt;inquiry closed date&lt;/STRONG&gt;. Both are &lt;STRONG&gt;DateTime data types&lt;/STRONG&gt;. What I would like to do is &lt;STRONG&gt;calculate the number of hours elapsed for each row, between the two columns&lt;/STRONG&gt;. Does anyone know of a way to do this? I was trying to write a formula but you can't really subtract dates and times, supposedly, so now I am stuck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help you can provide is greatly appreciated. Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 15:49:08 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175494#M45491</guid>
      <dc:creator>paigeblackstone</dc:creator>
      <dc:date>2018-06-20T15:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating # hours between dates</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175501#M45493</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/31208"&gt;@paigeblackstone&lt;/a&gt;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can actually find the difference between dates and times using the&amp;nbsp;&lt;SPAN&gt;DateTimeDiff(dt1,dt2,u) formula. For more information on this, go to this Alteryx article:&amp;nbsp;&lt;A href="https://help.alteryx.com/current/Reference/DateTimeFunctions.htm" target="_self"&gt;https://help.alteryx.com/current/Reference/DateTimeFunctions.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope this helps! Let us know if you still need more guidance.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 15:52:29 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175501#M45493</guid>
      <dc:creator>Kenda</dc:creator>
      <dc:date>2018-06-20T15:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating # hours between dates</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175502#M45494</link>
      <description>&lt;P&gt;Within the formula tool there is a syntax that allows you to do this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DateTimeDiff([dt1],[dt2],units)&lt;/PRE&gt;&lt;P&gt;In your instance units would be 'hours'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then your two date time fields would be dt1 and dt2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 15:53:29 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175502#M45494</guid>
      <dc:creator>BenMoss</dc:creator>
      <dc:date>2018-06-20T15:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating # hours between dates</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175505#M45496</link>
      <description>&lt;P&gt;hi @barnesK and @BenMoss,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;does it matter which date is entered first? Should the later date be listed first or will Alteryx still understand that you need the absolute difference between the two?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This seems to be exactly the solution I was looking for!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 15:57:28 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175505#M45496</guid>
      <dc:creator>paigeblackstone</dc:creator>
      <dc:date>2018-06-20T15:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating # hours between dates</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175508#M45498</link>
      <description>&lt;P&gt;From the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"S&lt;/SPAN&gt;&lt;SPAN&gt;ubtract the second argument from the first and return it as a duration"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I think your start date would be the 2nd argument, and your end date the first argument. I always get them the wrong way round but it's very easy to correct!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 16:01:02 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175508#M45498</guid>
      <dc:creator>BenMoss</dc:creator>
      <dc:date>2018-06-20T16:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating # hours between dates</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175520#M45501</link>
      <description>&lt;P&gt;@BenMoss&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Makes sense!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Okay so I ran it, however I am getting the error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"the formula resulted in a number but the field is a Date/Time. (Expression #1)."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know what this might be caused by?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 16:24:06 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175520#M45501</guid>
      <dc:creator>paigeblackstone</dc:creator>
      <dc:date>2018-06-20T16:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating # hours between dates</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175548#M45511</link>
      <description>&lt;P&gt;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/31208"&gt;@paigeblackstone&lt;/a&gt;&amp;nbsp;Is the field you're creating a number (int, double, etc.) field? As the article states, "&lt;SPAN&gt;The duration is returned as a number, not a string, in the specified units." So you need to make sure that whatever field you're using the expression in is a numerical field.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 16:51:46 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Calculating-hours-between-dates/m-p/175548#M45511</guid>
      <dc:creator>Kenda</dc:creator>
      <dc:date>2018-06-20T16:51:46Z</dc:date>
    </item>
  </channel>
</rss>

