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

• 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