<?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 Calculating time difference does not deliver the expected result in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference-does-not-deliver-the-expected-result/m-p/2383843#M856443</link>
    <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate the time difference between a column named "time_val" (formatted as date/time) as provided in the image below and "1/1/1970 0:00:00". The result should be provided in hours.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I created a new column and tried to calculate the time difference with the following expression:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;duration = DATEDIFF(DateValue("1/1/1970"),SomeTable[time_val].[Date],HOUR)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, this only provides the duration in multiples of 24, so it basically seems to calculate the days and multiply the result with 24. What I would need, however, is the exact number of hours.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To give an example: For an entry "01.01.1970 14:20:00" I would expect a response of 14 (hours). What I get, however, is 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd highly appreciate any help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and best regards&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;</description>
    <pubDate>Wed, 09 Mar 2022 15:43:02 GMT</pubDate>
    <dc:creator>Olifer</dc:creator>
    <dc:date>2022-03-09T15:43:02Z</dc:date>
    <item>
      <title>Calculating time difference does not deliver the expected result</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference-does-not-deliver-the-expected-result/m-p/2383843#M856443</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate the time difference between a column named "time_val" (formatted as date/time) as provided in the image below and "1/1/1970 0:00:00". The result should be provided in hours.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I created a new column and tried to calculate the time difference with the following expression:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;duration = DATEDIFF(DateValue("1/1/1970"),SomeTable[time_val].[Date],HOUR)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, this only provides the duration in multiples of 24, so it basically seems to calculate the days and multiply the result with 24. What I would need, however, is the exact number of hours.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To give an example: For an entry "01.01.1970 14:20:00" I would expect a response of 14 (hours). What I get, however, is 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd highly appreciate any help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and best regards&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 15:43:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference-does-not-deliver-the-expected-result/m-p/2383843#M856443</guid>
      <dc:creator>Olifer</dc:creator>
      <dc:date>2022-03-09T15:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time difference does not deliver the expected result</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference-does-not-deliver-the-expected-result/m-p/2383853#M856446</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="310692" data-lia-user-login="Olifer" class="lia-mention lia-mention-user"&gt;Olifer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Don't use the .date extension on the field.&amp;nbsp; That invokes the hidden auto time intelligence&amp;nbsp;date field.&amp;nbsp; Try this.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;duration = DATEDIFF(DateValue("1/1/1970"),SomeTable[time_val],HOUR)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 15:48:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference-does-not-deliver-the-expected-result/m-p/2383853#M856446</guid>
      <dc:creator>jdbuchanan71</dc:creator>
      <dc:date>2022-03-09T15:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time difference does not deliver the expected result</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference-does-not-deliver-the-expected-result/m-p/2383862#M856452</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="106637" data-lia-user-login="jdbuchanan71" class="lia-mention lia-mention-user"&gt;jdbuchanan71&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that did the trick! Thanks a lot for your quick support!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 15:52:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference-does-not-deliver-the-expected-result/m-p/2383862#M856452</guid>
      <dc:creator>Olifer</dc:creator>
      <dc:date>2022-03-09T15:52:42Z</dc:date>
    </item>
  </channel>
</rss>

