Hi,
We are using FTI (fusion transport intelligent in OTM) with OBIEE and we need to transform the date field in UTC to local timezone.
How to perform the formulas to transform the data on the criteria formula?
Thanks and regards.
Pablo.
here is an example showing a fully worked demo in SQL
You'll see the code used to convert UTC to local in the SELECT
SQL> CREATE TABLE imported_events (event_date TIMESTAMP(0) WITH TIME ZONE); Table created. SQL> BEGIN 2 INSERT INTO imported_events VALUES ( '10-JAN-08 2:00:00 PM UTC'); 3 INSERT INTO imported_events VALUES ( '08-MAR-08 2:00:00 PM UTC'); 4 INSERT INTO imported_events VALUES ( '09-MAR-08 6:59:00 AM UTC'); 5 INSERT INTO imported_events VALUES ( '09-MAR-08 7:01:00 AM UTC'); 6 INSERT INTO imported_events VALUES ( '09-MAR-08 2:00:00 PM UTC'); 7 INSERT INTO imported_events VALUES ( '10-MAR-08 2:00:00 PM UTC'); 8 INSERT INTO imported_events VALUES ( '09-JUN-08 2:00:00 PM UTC'); 9 COMMIT; 10 END; 11 / SQL> COLUMN ROWNUM FORMAT 99 SQL> COLUMN event_date_utc FORMAT A25 SQL> COLUMN offset_local FORMAT 99 SQL> COLUMN offset_eastern FORMAT 99 SQL> SELECT ROWNUM 2 ,event_date event_date_utc 3 ,TO_CHAR(CAST((event_date AT LOCAL) AS DATE),'YYYY-MM-DD HH24:MI:SS') date_local 4 ,(CAST((event_date AT LOCAL) AS DATE) - CAST(event_date AS DATE))*24 offset_local 5 ,TO_CHAR(CAST((event_date AT TIME ZONE 'US/Eastern') AS DATE),'YYYY-MM-DD HH24:MI:SS') date_eastern 6 ,(CAST((event_date AT TIME ZONE 'US/Eastern') AS DATE) - CAST(event_date AS DATE))*24 offset_eastern 7 FROM imported_events 8 ORDER BY 1; ROWNUM EVENT_DATE_UTC DATE_LOCAL OFFSET_LOCAL DATE_EASTERN OFFSET_EASTERN ------ ------------------------- ------------------- ------------ ------------------- -------------- 1 10-JAN-08 02.00.00 PM UTC 2008-01-10 10:00:00 -4 2008-01-10 09:00:00 -5 2 08-MAR-08 02.00.00 PM UTC 2008-03-08 10:00:00 -4 2008-03-08 09:00:00 -5 3 09-MAR-08 06.59.00 AM UTC 2008-03-09 02:59:00 -4 2008-03-09 01:59:00 -5 4 09-MAR-08 07.01.00 AM UTC 2008-03-09 03:01:00 -4 2008-03-09 02:01:00 -5 5 09-MAR-08 02.00.00 PM UTC 2008-03-09 10:00:00 -4 2008-03-09 09:00:00 -5 6 10-MAR-08 02.00.00 PM UTC 2008-03-10 10:00:00 -4 2008-03-10 09:00:00 -5 7 09-JUN-08 02.00.00 PM UTC 2008-06-09 10:00:00 -4 2008-06-09 10:00:00 -4 7 rows selected.
Another option is
CAST((FROM_TZ(CAST(utc_date AS TIMESTAMP),'UTC') AT TIME ZONE 'CST') AS DATE) cst_date
select from_tz(CAST ('15-oct-2014' AS TIMESTAMP),'GMT') at TIME ZONE 'US/Central' with_daylight_savings, from_tz(CAST ('15-nov-2014' AS TIMESTAMP),'GMT') at TIME ZONE 'US/Central' without_daylight_savings from dual;
Hi Pablo, Welcome to the Oracle Analytics community and thanks for your question. To add to Brendan's excellent response, you can also use use variables.DATA_TZ and DATA_DISPLAY_TZ
DATA_TZ
DATA_DISPLAY_TZ
Description of Time Zone Settings
Hi guys,
The problem is that the OBIEE formula box doesn't accept Oracle DB functions. For example, the following functions transform the date into a specific format:
But then when I try to put them in a similar way in the formula of the tool it does not accept the syntax and gives an error:
I think the FROM_TZ function is not supported in OBIIE.
Is there any similar function for OBIEE?
OBIEE usually automatically convert date/time to the user account time zone configuration. It does it on all the dates columns not having a time zone (they are considered UTC and therefore adapted to the user).
In your case, what is the physical data type of that column? Because that could be the reason why OBIEE isn't doing the translation automatically.
If you want a fixed conversion adding/subtracting a fixed number of hours, you can use TIMESTAMPADD(…)
To use database functions, you have to enable and use EVALUATE FROM_TZ function is a database function, not an OBI function
Here's a link to a previous post/discussion about using EVALUATE. It also contains a link to a website with some examples
I think we have not permissions for use EVALUATE function in OTM FTI version. There is a limited version if OBIEE. I get several errors.
TIMESTAMPADD(…) is an option I was considering, the problem is that it is not always the same time difference, depending on the day of the year it can be +1 (from October to March) or +2 (from March to October)
Thanks and regards
Description: Join our Product Management team to learn about new features that are part of 26.R3 Application release of Fusion Data Intelligence (SCM). The session will cover updates on Supply Chain Management and Procurement. Presented by: Anil Sebastian - Senior Director, SCM Product Management, Fusion Data Intelligence…
So when I click the apply button, it uses the value . Also. How do I stop the auto populate table when the report opens???? I am in OAC
Good day, please kindly assist. We are creating a graph to calculate the number of assets per milestones. However, the planners have only populated assets for only one milestone from the list of milestones the customer wants to track. Which gives an incorrect view as the project moves past different milestones that it has…
I scheduled the report in OTBI and the agent was run successfully. However, I do not receive the report after the run in my inbox. The addresses are properly recorded, and the report is in an excel format and saved as a pivot table in otbi. What can be the cause?
Anyone has any idea why the OAC documentation on custom viz is not available now? I was able to access till last week - https://docs.oracle.com/en/cloud/paas/analytics-cloud/acsdv/build-package-extension.html. Does this mean OAC doesnt support custom viz or custom workbook extensions?
I made a parameter with letter range values… put it into a dashboard filter. Then I created an expression filter to bind it to my last name column in the table with the image I uploaded here. I am getting the following error??? Invalid Expression. Validation of parameter values failed. A general error has occurred. Message…