BI Publisher EE and JD Edwards Julian Date Format
By Shahed Munir
One of my clients has JD Edwards and raised a query with me the other day regarding Julian Dates and how to utalise them in BI Publisher EE.
I wrote a function to convert the date from Julian to Gregorian Date format and then Create a BI Publisher parameter as normal....
Julian = 110001
Gregorian = 01-01-2010
-- Compile Function in Database to Convert Julian Date to Gregorian Date
create or replace
FUNCTION UTIL_Julian_To_Date(julian in int)
return date is
BEGIN
DECLARE
year int;
days int;
BEGIN
if (julian < 1001) then
return to_date('1900-01-01','yyyy-mm-dd');
end if;
year := 2000 + substr(to_char(julian),2,2);
days := substr(julian,4,3) - 1;
return to_date(to_char(year) || '-01-01', 'yyyy-mm-dd') + days;
END;
-- SQL For BI Publisher
select to_char(UTIL_Julian_To_Date(ship_date),'DD-MM-YYYY'), product
from my_table
where to_date(to_char(UTIL_Julian_To_Date(ship_date),'DD-MM-YYYY'),'DD-MM-YYYY') = :TRIGGER_DATE
-- BI Publisher EE Parameter Setup
Create a Date Parameter called Trigger Date or what ever you have called your :parameter
The Date Format Sting needs to be filled in : dd-MM-yyyy (The MM has to be Upper Case)
That worked a treat...
Translate
Tuesday, 7 December 2010
JD Edwards and BI Publisher Dates
Blog Archive
-
▼
2010
(33)
-
▼
December
(12)
- OBIA 7.9.6.2 HR Analytics Overview
- Linux Cache Flushing
- OBIEE 11G Query Logging
- Oracle Data Integrator Agents
- ODI Creating Error Generation Reports.
- ODI and Sending Mails with SMTP Authenticated Server
- JD Edwards and BI Publisher Dates
- BI Publisher Enterprise Edition Data Templates
- BI Publisher Forms Toolbar Office 2007
- OBIEE Direct Database Requests
- OBIEE 10g , 11G VMWARE Now Available
- OBIA 7.9.6 Full Setup Document on E Business R12
-
▼
December
(12)
Note: only a member of this blog may post a comment.