Link to home
Start Free TrialLog in
Avatar of W D
W DFlag for United States of America

asked on

Calculate difference between two times in Webi report

Hi,
I want to calculate the difference between two times in my Webi report using a formula.
I have two date time objects in my Webi report, Appt Dttm and Order Made Dttm. How can I show the hours difference between the two date time fields?
Appt Dttm and Order Made Dttm are in both in format 5/16/2011 11:21:00 AM
My formula so far is:
=DaysBetween([Appt Dttm];[Order Made Dttm])*24
But I don't believe it's calculating correctly because the result of 0 is displayed for example, when Appt Dttm = 5/16/2011 11:00:00AM and Order Made Dttm = 5/16/2011 11:21:00AM.
Avatar of Mike McCracken
Mike McCracken

The example you give is only 10 minutes thus there are 0 days.

mlmcc
Avatar of W D

ASKER

mlmcc, apolgies, II don't want days, I need hours. How should I rework my formula?
I don't use WebI so I don't know the formulas or functions available.

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of James0628
James0628

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of W D

ASKER

James0628, you're right, it was easier to do this conversion in the view (in the SQL).
Avatar of W D

ASKER

BTW, just got an email from an SAP support person: the Datediff function calculates the amount of time between two dates, where the time part is based on an interval of times, such as hours, days, weeks, months, years. This function can be used in constructing relative date-time objects too (or to create an objects that calculates the hours difference between two fields).
Were they talking about the BO report writer or the CR report writer?  CR has DateDiff, but BO 6.5 doesn't.  Maybe they've added it to BO since then.

 Anyway, glad you were able to work it out.

 James