BusinessObjects Board

Aging in fraction of days.

i need to know how to calculate aging in fraction of days. the function given by BO is day between but it will give me in days like 2 days and not fraction like 2.4days.

one way of doing it is in universe level where i create a object and put in the formula “datediff”(we are using ms sql) and then pull from BO.

i want to know how to do fraction of days in BO.


ice (BOB member since 2003-08-13)

A sketch:
You would have to parse out the time from your timestamp universe object (FormatDate, Pos, SubStr), turn the time into some number (SubStr, Pos, ToNumber, etc.). Then you can subtract the two numbers representing minutes for example, convert the result of minutes back into a fraction of days (minutes / 24*60). You can add this fraction to the difference in days - all this is done on the Business Objects Reporter side.

With some work on your side you should be able to come up with the complete solution :wink:


Andreas :de: (BOB member since 2002-06-20)

your way is quite good, just that i need to a lot of formula and function … not sure i did it right or not… any samples…

any other way…


ice (BOB member since 2003-08-13)

Here’s how I accomplished this in DB2


Eileen King :us: (BOB member since 2002-07-10)

Eileen, your work fine but how do i put it in BO. i did an sql command datediff and kept it in the universe. it is the same as yours.

i have a object called last move date which actually tracking the movement of part. so i need to do aging to see how long it has been not active… so we need to do againg which is sysdate - last move date…

in bo sysdate = CurrentDate() but i can’t minus with last move date as it will give me error. so i am working for other option…

andreas way is quite good and i am testing it but i am not sure if the function/formula i out in is correct or not…


ice (BOB member since 2003-08-13)

If you want to do it in BO check out
this You don’t say what version of BO you have but I know this works in V5. It should do exactly what you need.


ken.gaul :uk: (BOB member since 2002-06-18)

ken,

before i put this dll into my server,… i need to understand a few thing…

  1. which userlib should i put in… is it in C:…Business Objects\BusinessObjects 5.0\UserLibs\Sample … or some where else

  2. also, where will i see this datediff?? is it in shown in “Variable” - “Function” as a new function name called “datediff”

thks


ice (BOB member since 2003-08-13)

Put it in C:…Business Objects\BusinessObjects 5.0\UserLibs directly
The function will show under the all and Misc catagories.


ken.gaul :uk: (BOB member since 2002-06-18)

tested and it is very very useful… thks for the knowledge…


ice (BOB member since 2003-08-13)