X

An Oracle blog about BI Publisher

A date addition

.. dats cos I god a code and my dose is bunged dup.
No I did mean 'a date addition', not a 'late addition'. Calculating dates has been tought with XSL until 2.0 arrived when things got much easier. Sadly our XSLT engine does not yet support that part of the 2.0 standard so we can not take advantage of the date manipulation functionality. We have provided some help for you thou to carry out simple date caluclations.



We have a funtion that will take an XSD date, remember them, a number of days or an offset and an operator. It takes the following format: 



<?xdoxslt:ora_format_date_offset(date, offset, 双perator?)?>



Using it in anger we might have:



<?xdoxslt:ora_format_date_offset(INVOICE_DATE, INVOICE_TERMS, ?+?)?>

This would take the invoice date and add the number of days in the invoice terms element to arrive at a payment due date. We do not have native abilities to subtract one date from another, or add them. To do that right now will require you to treat dates as strings or format them to a julian format, perform the calculation and then reformat ... all very messy. We'll make it better in the near future I hope.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.