Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Bi Publisher - add 7 days to a date element in rtf template

Received Response
434
Views
4
Comments

Content

I wish to add 7 days to a date element in rtf template. I read several topics but I cannot get it to work somehow.

I have the following code in my rtf template:

<?if:count(PROMISED_DATE)='0'?><?format-date:xdoxslt:ora_format_date_offset(CREATION_DATE,7,’+’);'DD-MM-YYYY'?><?end if?>

Unfortunately it is not increasing the creation date + 7 days in my template. What am I doing wrong?

Thanks. Ilona

Version

Bi Publisher 12.2.1.4.0

Code Snippet

<?if:count(PROMISED_DATE)='0'?><?format-date:xdoxslt:ora_format_date_offset(CREATION_DATE,7,’+’);'DD-MM-YYYY'?><?end if?>

Answers

  • userva
    userva Rank 4 - Community Specialist

    try this

    <?format-date:(xdoxslt:ora_format_date_offset(xdoxslt:ora_format_date(‘2020-11-15’,'YYYY-MM-DD'),14,'+'));'DD MONTH YYYY'?>

    above code worked for me and output is 29th November 2020

  • Hi,

    You can try this as well:<br /> <?format-date:(xdoxslt:ora_format_date_offset(xdoxslt:sysdate(&#39;YYYY-MM-DD&#39;),7,&#39;+&#39;));&#39;DD-MM-YYYY&#39;?>

    -Sandeep

  • IlonaV
    IlonaV Rank 2 - Community Beginner

    Hi Datlaavinash,

    This works for me too, but instead of '2020-11-15' I want to add the days to CREATION_DATE. When I change '2020-11-15' to CREATION_DATE or 'CREATION_DATE' it does not work anymore unfortunately. Do you have another option?

    Thanks.

    Ilona

  • IlonaV
    IlonaV Rank 2 - Community Beginner

    Hi Sandeep,,

    This works for me too, but instead of sysdate I want to add the days to CREATION_DATE. When I change sysdate to CREATION_DATE it does not work anymore unfortunately. How do I go about adding 7 days to tag CREATION_DATE?

    Thanks.

    Ilona