Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2004
    Location
    Las Vegas, NV USA
    Posts
    38

    Unanswered: Calculation IN Oracle Reports

    I need to run a calculation between DATES. Basically I need to calculate dates to find out if an item is due within 30 days. How do I run a subtraction calculation in Oracle Reports and return a 'YES' or 'NO' response.
    Thanks!
    Todd Farino
    Timet Corporation
    todd.farino@timet.com

  2. #2
    Join Date
    Jan 2004
    Location
    Venezuela
    Posts
    151

    Re: Calculation IN Oracle Reports

    Originally posted by tfarino
    I need to run a calculation between DATES. Basically I need to calculate dates to find out if an item is due within 30 days. How do I run a subtraction calculation in Oracle Reports and return a 'YES' or 'NO' response.
    Thanks!
    with functions and you can use that function as element for that output in the report.
    Joel Pérez

  3. #3
    Join Date
    Jan 2004
    Location
    Las Vegas, NV USA
    Posts
    38
    Thanks. The Function I'm trying to write is subtracting one DATE from another. The current date comes in from a parameter, the other date is from the database in a item in the report. How do you call a parameter in a Function:
    return (:DATE_DUE - DATE_NOW)
    date_now is the parameter.
    Thanks!
    Last edited by tfarino; 01-14-04 at 15:11.
    Todd Farino
    Timet Corporation
    todd.farino@timet.com

  4. #4
    Join Date
    Jan 2004
    Location
    Venezuela
    Posts
    151
    Originally posted by tfarino
    Thanks. The Function I'm trying to write is subtracting one DATE from another. The current date comes in from a parameter, the other date is from the database in a item in the report. How do you call a parameter in a Function:
    return (ATE_DUE - DATE_NOW)
    date_now is the parameter.
    Thanks!
    with this ( : ) ahead of the variable.
    Joel Pérez

  5. #5
    Join Date
    Jan 2004
    Location
    Las Vegas, NV USA
    Posts
    38
    Yes, I removed the smiley stuff. Its
    return (:DATE_DUE - date_now)

    Date_due is a column in the DB, date_now is the User parameter.
    Todd Farino
    Timet Corporation
    todd.farino@timet.com

  6. #6
    Join Date
    Jan 2004
    Location
    Venezuela
    Posts
    151
    Really I am a DBA but I remember that I have done it. I recommend you to post this topic in Form Forums in otn.oracle.com . I can ensure you that they are going to answer the question fast
    Joel Pérez

  7. #7
    Join Date
    Jan 2004
    Location
    Las Vegas, NV USA
    Posts
    38
    It tells me I must declare date_now. What should I delcare it as?
    Todd Farino
    Timet Corporation
    todd.farino@timet.com

  8. #8
    Join Date
    Jan 2004
    Location
    Las Vegas, NV USA
    Posts
    38
    Ill check it out.
    Thanks!
    Todd Farino
    Timet Corporation
    todd.farino@timet.com

  9. #9
    Join Date
    Jan 2004
    Location
    Venezuela
    Posts
    151
    In this moment Discussion Forum in OTN are down but to start of tomorrow they are going to be up.
    Joel Pérez

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •