<?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>Question Re: DWC : Inconsistent datatype; Decimal is invalid for function seconds_between in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/dwc-inconsistent-datatype-decimal-is-invalid-for-function-seconds-between/qaa-p/12726029#M4775936</link>
    <description>&lt;P&gt;Hello  &lt;SPAN class="mention-scrubbed"&gt;madhavvikranth&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;As the column is of type - Decimal, the following type casting needs to be done - &lt;/P&gt;&lt;P&gt;&lt;EM&gt;SECONDS_BETWEEN(TO_TIMESTAMP(TO_VARCHAR(TO_BIGINT(CreationTS)),'YYYYMMDDHHMISS'),TO_TIMESTAMP(TO_VARCHAR(TO_BIGINT(CompletionTS)),'YYYYMMDDHHMISS'))/60/60&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Here is the output - &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2121855-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amogh K&lt;/P&gt;</description>
    <pubDate>Tue, 27 Dec 2022 18:07:00 GMT</pubDate>
    <dc:creator>amoghkulkarni</dc:creator>
    <dc:date>2022-12-27T18:07:00Z</dc:date>
    <item>
      <title>DWC : Inconsistent datatype; Decimal is invalid for function seconds_between</title>
      <link>https://community.sap.com/t5/technology-q-a/dwc-inconsistent-datatype-decimal-is-invalid-for-function-seconds-between/qaq-p/12726028</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Calculated KPI Timestamp difference: In DWC&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;Hi Everyone, &lt;/P&gt;
  &lt;P&gt;I was trying to get a solution for the below &amp;amp; tried searching the forums. Tried various functions to get the desired output but no luck. Could you please look at the below and share what might be going wrong / how should this be achieved?&lt;/P&gt;
  &lt;P&gt;I have data coming in from S4HANA --&amp;gt; DWC. I have 2 timestamp fields, say Creation &amp;amp; Completion timestamps of Data type ‘DECIMAL’ (It's from S4H source table itself)&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2124796-data-sample.png" /&gt;&lt;/P&gt;
  &lt;P&gt; ------------------------------------&lt;/P&gt;
  &lt;P&gt;I am trying to do the calculations in DWC to get the processing time. &lt;/P&gt;
  &lt;P&gt;When I use, SECONDS_BETWEEN function (datatype changes from Decimal) &amp;amp; It gives me an error stating that &lt;STRONG&gt;"Error- inconsistent datatype: at least one of the following argument types DECIMAL or DECIMAL is invalid for function seconds_between:"&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt; Anything that I use to calculate difference is not working. Some functions are not accepted in DWC and others give me the error as stated.&lt;/P&gt;
  &lt;P&gt;Any idea, on how this has to be implemented? It helps.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2022 14:56:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dwc-inconsistent-datatype-decimal-is-invalid-for-function-seconds-between/qaq-p/12726028</guid>
      <dc:creator>former_member183290</dc:creator>
      <dc:date>2022-12-27T14:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: DWC : Inconsistent datatype; Decimal is invalid for function seconds_between</title>
      <link>https://community.sap.com/t5/technology-q-a/dwc-inconsistent-datatype-decimal-is-invalid-for-function-seconds-between/qaa-p/12726029#M4775936</link>
      <description>&lt;P&gt;Hello  &lt;SPAN class="mention-scrubbed"&gt;madhavvikranth&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;As the column is of type - Decimal, the following type casting needs to be done - &lt;/P&gt;&lt;P&gt;&lt;EM&gt;SECONDS_BETWEEN(TO_TIMESTAMP(TO_VARCHAR(TO_BIGINT(CreationTS)),'YYYYMMDDHHMISS'),TO_TIMESTAMP(TO_VARCHAR(TO_BIGINT(CompletionTS)),'YYYYMMDDHHMISS'))/60/60&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Here is the output - &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2121855-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amogh K&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2022 18:07:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dwc-inconsistent-datatype-decimal-is-invalid-for-function-seconds-between/qaa-p/12726029#M4775936</guid>
      <dc:creator>amoghkulkarni</dc:creator>
      <dc:date>2022-12-27T18:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: DWC : Inconsistent datatype; Decimal is invalid for function seconds_between</title>
      <link>https://community.sap.com/t5/technology-q-a/dwc-inconsistent-datatype-decimal-is-invalid-for-function-seconds-between/qaa-p/12726030#M4775937</link>
      <description>&lt;P&gt;Thanks a lot, Amogh. This worked &amp;amp; this is what we are expecting. &lt;/P&gt;&lt;P&gt;We will further be fine tuning this KPI for giving a meaningful info to Business in HH:MM:SS. But, the purpose is achieved in first place.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2022 07:10:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dwc-inconsistent-datatype-decimal-is-invalid-for-function-seconds-between/qaa-p/12726030#M4775937</guid>
      <dc:creator>former_member183290</dc:creator>
      <dc:date>2022-12-28T07:10:55Z</dc:date>
    </item>
  </channel>
</rss>

