Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 14 Oracle Analytics Lounge
- 211 Oracle Analytics News
- 42 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 78 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Help in finding difference of two dates

Hi,
Could you please help in finding the difference between two Gate dates as new column in OBIEE.They have been separated as shown below.
Thanks in advance.
{
Project1 | Gate Name | Gate 1 Open Date | Gate2 OpenDate |
Project1 | Gate1 | 15-Feb-16 | |
Gate2 | 20-Feb-16 | ||
Project2 | Gate1 | 1-Mar-16 | |
Gate2 | 10-Mar-16 |
}
Regards,
Lak
Answers
-
to do this in Answers is very inefficient ... you'd be better served having this implemented in the database (use of your information drives your design). however,
In answers criteria tab ... use the Project column, the date column (filtered by gate1), the date column (filtered by gate2), then ensuring you have real date/timestamps you can easily get the difference:
TIMESTAMPDIFF(interval, timestamp1, timestamp2)
intervals are:
SQL_TSI_SECOND
SQL_TSI_MINUTE
SQL_TSI_HOUR
SQL_TSI_DAY
SQL_TSI_WEEK
SQL_TSI_MONTH
SQL_TSI_QUARTER
SQL_TSI_YEAR
0 -
Thanks for the prompt responce.I understood how to calucate the date difference using TimestampDiff but not exactly how to filter these columns.
I am attaching the screenshot how the data appears
Thanks in
advance.
0 -
Hello,
Please check
Your requirement
Criteria Structure:
Formulas by each column:
Kind Regards,
0 -
Hi cesar,
Thank you so much for your time.
I will try your logic on my actual data and let you know the results.
BTW, is there any way to remove the duplicates in 'MetricCalculated' column.
Regards,
Lak
0 -
Hello,
Please try with this., CAST your VALUE as CHAR and apply.
Kind Regards,
0 -
Thank you very much cesar.
Basically ,I am from PLM background and bit new to this OBIEE.
I will try all your inputs and let you know the results.
Regards,
Lak
0 -
Dont worry lak, the pleasure is mine.
Kind Regards,
0 -
Cesar,
Can we achieve the same result through LEAD/LAG functions along with TimestampDiff fucntion.
Please advice.
Regards,
Lak
0 -
Hello,
Sorry but LAG/LEAD is not support DATE or DATETIME.
Kind Regards,
0 -
Hello,
Another option, its to set up, your EVAUATE_SUPPORT_LEVEL in you NQSConfig.ini file
Develop an database function, and implement your LEAD/LAG, and managed whatever calculation that you want, Oracle BI Answers, has a little restricts.
Despite of this, in the first advice that i gave you, do you want to considered, hours, minute and second? if the answers is yes, you could get also this.
Hope this help.
Kind Regards,
0