BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Follow BOB on Twitter! 
Follow BOB on Twitter! (Opens a new window)  

General Notice: BOB is going to retire...please see details here.
General Notice: No events within the next 45 days.

Date Time Difference in Webi


 
Search this topic... | Search Web Intelligence... | Search Box
Register or Login to Post    Forum Index -> Building Reports -> Web Intelligence  Previous TopicPrint TopicNext Topic
Author Message
chetan.mudike
Principal Member
Principal Member



Joined: 13 Feb 2008

Posts: 184


flag
PostPosted: Thu May 22, 2008 8:55 am 
Post subject: Date Time Difference in Webi

Hi All

I appreciate your help on this issue

I am trying to create a variable in Webi Intelligence (XI) where i can get the difference between Date Objects X and Y (format is dd/mm/yyyy hh:mm:ss AM/PM) and the output should be in Days,Hours and Mins

I have tried the DaysBetween in Webi Intelligence but it is givning me only Days as output

Could you please help me on this as this is a priority for me

banghead.gif

Thanks In Advance
Back to top
Superbossman
Forum Member
Forum Member



Joined: 14 Apr 2008

Posts: 3
Location: US


flag
PostPosted: Thu Jun 05, 2008 10:49 am 
Post subject: Re: Date Time Difference in Webi

I had to do the same thing and I found this on here from one of the other members. It helped me out in so many other tasks I was working on. I forget who posted it but thank you it has been a huge help.


**NOTE: in first section the former number first followed by prior number.
in last section the prior and then the former number.


/* time between two timestamps in hours */
=
(
(
(ToNumber(SubStr(FormatDate(<Discharge Date> ,"HH:mm:ss") , 1 , 2 ) ) * 60 * 60 ) +
(ToNumber(SubStr(FormatDate(<Discharge Date> ,"HH:mm:ss") , 4 , 2 ) ) * 60) +
(ToNumber(SubStr(FormatDate(<Discharge Date> ,"HH:mm:ss") , 7 , 2 ))))
-
((ToNumber(SubStr(FormatDate(<Admission Date> ,"HH:mm:ss") , 1 , 2)) * 60 * 60 ) +
(ToNumber(SubStr(FormatDate(<Admission Date> ,"HH:mm:ss") , 4 , 2)) * 60) +
(ToNumber(SubStr(FormatDate(<Admission Date> ,"HH:mm:ss") , 7 , 2)))
)
) / 3600
+ (DaysBetween(<Admission Date> , <Discharge Date>) * 24 )
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Building Reports -> Web Intelligence  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0276 seconds using 17 queries. (SQL 0.0021 Parse 0.0009 Other 0.0246)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo