Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Reg: TimeStampDiff(SQL_TSI_HOUR)

Received Response
279
Views
1
Comments
User_JZKI6
User_JZKI6 Rank 4 - Community Specialist

Hi All,

We are calculating Hours diff between the dates in report level date format (MM-DD-YYYY)

Using below formula, but 3rd and 4th records it was showing the same Hrs_diff even the end date time is different can some help like how exactly this function calculate the Hours between dates.

Hrs _Diff = TimeStampDiff(SQL_TSI_HOUR,"Job".”Start Date","Job"."End Date")

Version we are using:  Oracle Business Intelligence 12.2.1.4.0

Thanks in advance,

Tagged:

Answers

  • To see exactly how the diff is calculated, just look at the physical query generated by your analysis and you will see the exact logic used in SQL.

    To explain your diff results, it's probably some rounding: either the "Hrs Diff" has a decimal component but you aren't showing it and therefore 4.66 => 5 and 5.16 => 5.

    Or it's maybe the function doing the rounding directly and returning only integers as result of a time diff calculation.