Skip to Content
author's profile photo Former Member
Former Member

Calculations for the Time Difference on the same Day

Hi All,

I have two time values for a given day for e.g, 8:32 AM and 4:32 PM(16:25). I need to calculate the difference in minutes.The calculation would be

[(16*60)+25] -[(8*60)+32]. Please help me build this formula in webi.

we are using BO 4.1 and Sybase IQ database.

Thanks for your efforts.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Feb 19, 2014 at 05:40 AM

    Hi,

    Code provided would be helpful.

    ***1st Variable:

    =(

    (

    (

    ToNumber( Substr( FormatDate( [Most recent timestamp]

    ;"HH:mm:ss" ) ; 1 ; 2 ) ) * 60 * 60 +

    ToNumber( Substr( FormatDate( [Most

    recent timestamp] ;"HH:mm:ss" ) ; 4 ; 2 ) ) * 60 +

    ToNumber( Substr(

    FormatDate( [Most recent timestamp] ;"HH:mm:ss" ) ; 7 ; 2 ) )

    )

    ****and another variable:

    (

    ToNumber( Substr( FormatDate( [Oldest timestamp] ; "HH:mm:ss" ) ; 1 ;2 ) ) *

    60 * 60 +

    ToNumber( Substr( FormatDate( [Oldest timestamp] ; "HH:mm:ss" ) ;

    4 ; 2) ) * 60 +

    ToNumber( Substr( FormatDate( [Oldest timestamp] ;

    "HH:mm:ss" ) ; 7 ; 2) )

    )

    )

    )

    *** Create 3rd Variable including above 2 variables:

    60 +

    ( DaysBetween( [Oldest

    timestamp] ; [Most recent timestamp] ) * 24 * 60 )

    Below is the link for your review.

    calculate difference between two times in webi

    Thanks,

    Jothi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 19, 2014 at 05:41 AM

    Is it in Date format or you just have it as String???

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.