previous date from sysdate in XML publisher — Oracle Analytics

Oracle Analytics Cloud and Server

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

previous date from sysdate in XML publisher

Received Response
91
Views
7
Comments

Summary

previous date from sysdate in XML publisher

Content

Hello,

how to get previous date from sysdate in XML publisher?

I want something like <?sysdate()-1?>

Answers

  • Sherry George
    Sherry George Rank 7 - Analytics Coach

    Hi,

    You could either try this <?xdoxslt:sysdate()-1?> or calculate the previous date in the dataset and use it in the report.

  • Vsilvery
    Vsilvery Rank 4 - Community Specialist

    Source Database is Oracle 11g.

  • Vsilvery
    Vsilvery Rank 4 - Community Specialist

    In report please

  • WVanSluys1
    WVanSluys1 Rank 3 - Community Apprentice

    Are you wanting to do in Report Template or in Query?

    What is your source database?

  • Vsilvery
    Vsilvery Rank 4 - Community Specialist

    <?xdoxslt:sysdate()-1?> output is not in correct format.

    for example: if i generate output today(2017/25/04), its printing as "202504".

    format is not changing even if i change property of this element.

    yes, i included in dataset and used in template.

    but i want to know method of using sysdate function in formula.

  • Brajesh Shukla-95078
    Brajesh Shukla-95078 Rank 7 - Analytics Coach

    This is preferable to calculate SYSDATE -1 in database and create XML tag for that. Because BI Publisher treat date as number so suppose you have 01-APR-2017 and you will do -1 for this it will print  00-APR-2017, this is not valid date. So better do it on database and use XML

  • Vsilvery
    Vsilvery Rank 4 - Community Specialist

    Thanks