Tuesday, March 10, 2009

OBIEE date prompt to day month year

A Obiee prompt from a calendar to a presentationvariable is cast as date. One way of extracting the day, month or year can be done based on the locate function:

day: substring( '@{Date1}{01/01/1900}' from (locate('/','@{Date1}{01/01/1900}',1) +1)for (locate('/','@{Date1}{01/01/1900}' ,4) - locate('/','@{Date1}{01/01/1900}',1)-1))

month: substring( '@{Date1}{01/01/1900}' from 1 for (locate('/','@{Date1}{01/01/1900}' ,1) -1))

year: substring( '@{Date1}{01/01/1900}' from (locate('/','@{Date1}{01/01/1900}' ,4) +1) for 4)

based on the MM/DD/YYYY format.

Till Next Time

John Minkjan is a principal BI-consultant and OBIEE Product Expert at Ciber in the Netherlands, the text of this article is also published on his personal blog: http://obiee101.blogspot.com/

No comments: