Oracle Transactional Business Intelligence

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Unable to extract current date from current_timestamp for the local timezone in OTBI

Received Response
31
Views
1
Comments

Hi,


I have a requirement to report current day sales value. I am trying to leverage CURRENT_TIMESTAMP function as it gives me my local time. But when I try to extract date value from the current_timestamp after 5pm PST, it reverts to the next day as it picks the UTC time. Is there a way for me to override that and get the date part of the current_timestamp without UTC? Please advice.


Best

Shifa

Tagged:

Answers

  • Gayatri Chappalli-Oracle
    Gayatri Chappalli-Oracle Rank 3 - Community Apprentice

    Try this Replace with Current_Date and try below Sample Code to fetch Date value


    SELECT TO_CHAR(TO_DATE(substr('2023-11-01T00:00:00.000+00:00',1,INSTR('2023-11-01T00:00:00.000+00:00','T',1)-1),'YYYY-MM-DD'),'dd-mon-yyyy', 'NLS_DATE_LANGUAGE=ENGLISH') from dual