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
Explore how to build agents using code in AI Data Platform. We'll create an agent that examines and analyzes the contents of a Github repository and reports its findings. The session demonstrates how to use different developer tools to create agents including the AIDP extension for VS Code and Codex. Using these tools we…
What is wrong with this code
Am I missing something or is there no way to search through previous posts to make sure I don't duplicate a question? All I see on the filter options are tags or status… a general search for a word or phrase would be helpful.
We were under the impression that when exporting a visualization in DV to CSV format hidden columns would be include from the grammar panel. This is not happening. See below for a screenshot showing 3 hidden columns that do not appear when exporting the pivot table to CSV. This seems to have worked a month or so back but…
Migrated RPD from obiee12c to OAS 2024. post migration when we try to access dashboards on OAS we are getting below error: State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. (HY000) State: HY000. Code: 43275. [nQSError: 43275] Message returned from OBIS…
There is no option for legend title in many visualization types.