Skip to Content
Former Member

### Days between job raised and completed variable

Hi, im new to this website and semi new to Desktop intelligence. i have created a report that returns data by job number (i work at a housing association). the job number has 2 lots of data i am trying to interrogate, one is the time the job number was raised (i.e. 15/04/2008 09:30) and the time the job was completed (i.e. 15/04/2008 15:53), basically if the job is completed within 24 hours then we have hit out target if it is not we have missed, i need to measure this data.

sometimes a job can be put on hold before it is completed. (i.e. raised: 15/04/2008 09:30, on hold 15/04/2008 12:00, completed 15/04/2008 15:53) for some reason the variable doesnt count the jobs if they have gone on hold. so i am now using a new found variable of

"=((ToNumber(FormatDate(<Date Job Completed (Status 3)> ,"HH"))*60)(ToNumber(SubStr(FormatDate(<Date Job Completed (Status 3)> ,"HH:mm:ss") ,4 ,2)))+(DaysBetween(<Date & Time Job Raised> ,<Date Job Completed (Status 3)>)2460))/1440"

this above one works great however it slightly adds on an hour or two to the answer. (instead of being 0.97 days to complete it returns 1.20 days to complete)

there is no pattern in the extra hours it adds on at all.

can snyone see anything worng with the formual i am now using!?

any help would be appreciated,

thank you

Samantha Brown- Business Analyst

##### Add comment
10|10000 characters needed characters exceeded

### 1 Answer

• Best Answer
Former Member
Sep 30, 2008 at 01:10 PM

Samantha,

I'm not too keen on DeskI formulas as I usually work in a WebI environment, but an observation in using BusinessObjects tools seems to come up frequently when doing math computations is the need to use a decimal point within a value in order to get more consistent results. I notice in your formula that you are taking a date and multiplying (24 * 60)/1440, but if you could work it as (24.0 * 60.0)/1440.0) or you may even need to do something like 1.0((2460)/1440). The point is in trying to put decimal values (or introduce a decimal value to the formula) and in doing so you will invoke floating point operations and in turn perhaps get more consistent results. Just a shot in the dark to you as a suggestion....

Thanks,

John

##### Add comment
10|10000 characters needed characters exceeded
• Former Member Former Member

Samantha,

Have you made any more head way on this? You don't mention what RDBMS platform you're under. Each vendor has their own method for manipulating date/time factors, but If it is SQL server, then perhaps you can use the "datediff" function. To get the number of minutes between two dates: datediff(mi, startdate, enddate)

Once you get the elapsed minutes, then you can divide like your previous formula to determine hours/days to complete.

Thanks,

John