XML Publisher - Format Field Date - Bi Publisher

Oracle Business Intelligence, Oracle Warehouse Builder OWB, Oracle Discoverer, BI Publisher, XML Publisher, OLAP, Data Mining, ODI Oracle Data Integrator, etc
Post Reply
User avatar
dr_gori
Moderador
Moderador
Posts: 5024
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

After attempting various forms, I was able to format a field date in the XML Publisher as follows:

The input field was coming with this format:

Select all

24-NOV-2010 19:08:23
Then: I clicked twice in the field, properties, help text.
Ali, I put the following code in the "Status Bar" tab

Select all

<?xdofx:substr(CREATION_DATE,1,11)?>
This way it converts the text that comes to that default date.


Then: does anyone know a better way to format the dates?
I wanted to transform on 24/11/2010 :-(

.
Last edited by dr_gori on Fri, 03 Dec 2010 7:51 am, edited 1 time in total.
LordElfo
Rank: Analista Pleno
Rank: Analista Pleno
Posts: 111
Joined: Thu, 22 Feb 2007 2:34 pm
Location: DF
________________
http://lordelfo.blogspot.com
Thiago Façanha

Opa guy tries this here oh.

Select all

<?xdofx: 
(substr(CREATION_DATE,9,2)||'/'||decode(substr(CREATION_DATE,6,2)||'/'|substr(CREATION_DATE,1,4))?>
User avatar
dr_gori
Moderador
Moderador
Posts: 5024
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

My problem is the mês field, which is in mon-format.

24- nov -2010 19:08:23

I have already tried everything to format this month, but xdofx seems that it does not accept much other than substr, nvl and decode ... :(
LordElfo
Rank: Analista Pleno
Rank: Analista Pleno
Posts: 111
Joined: Thu, 22 Feb 2007 2:34 pm
Location: DF
________________
http://lordelfo.blogspot.com
Thiago Façanha

Hmmm then the way is to use the same decode ....
01 - 'Jan'
02 - 'fev'
User avatar
dr_gori
Moderador
Moderador
Posts: 5024
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

That is it! :-(

And to make matters worse, you can be in Portuguese or English :-
alexrsilva
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 153
Joined: Tue, 27 May 2008 1:31 pm
Location: Rio de Janeiro - RJ
Alex Silva
Analista de Sistemas
11i.10 Applications Developer Implementation Champion
11i.10 E-Business Suite Integration Champion

User avatar
dr_gori
Moderador
Moderador
Posts: 5024
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Hi Alexrsilva

In fact, this link works for when the formatting is coming in the YYYY-MM-DD standard.

As my date is coming in the following format: dd-MON-yyyy hh24:mi:ss

Then I managed to wear Decode even for the months in English and Portuguese:

Select all

<?xdofx:substr(CREATION_DATE,1,2)?>/<?xdofx:decode(substr(CREATION_DATE,4,3), 
'JAN','01/','FEB','02/','FEV','02/','MAR','03/','APR','04/','ABR','04/', 
'MAY','05/','MAI','05/','JUN','06/','JUL','08/','AUG','08/','AGO','08/', 
'SEP','09/','SET','09/','OCT','10/','OUT','10/','NOV','11/','DEC','12/','DEZ','12/' )?><?xdofx:substr(CREATION_DATE,8,4)?>
: -The solved
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests