Search code examples
rtfbi-publisher

BIP > Getting Hours and Minutes from a date


In my xml I have a date like "08/21/2011 18:17:52" and I need it's hours and minutes in AM/PM format like "08/21/2011 18:17:52" will be 06:17 PM. I tried setting format on from the template itself in the "Formatting" section. I tried following:

  1. Tried setting format in BIP rtf template designer

enter image description here

  1. Tried to format like below:

But it did not work.

I am attaching sample xml and rtf.

Please guide me how can I get the hour and minutes part.

I want the output like this:

enter image description here


Solution

  • I get the solution of my problem.

    1. Include below line on the rtf:

    <?namespace:psfn=http://www.oracle.com/XSL/Transform/java/com.siebel.xmlpublisher.reports.XSLFunctions?>

    1. Get the required time as below:

    <?psfn:getCanonicalDate(PlannedCompletion)?>