W D
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.
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.
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
mlmcc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
James0628, you're right, it was easier to do this conversion in the view (in the SQL).
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
Anyway, glad you were able to work it out.
James
mlmcc