US and Worldwide: +1 (866) 660-7555
Results 1 to 5 of 5

Thread: YESTERDAY() giving me a date in the future

  1. #1

    Default YESTERDAY() giving me a date in the future

    I have a report with two date parameters, one set to =YESTERDAY() and one set to =NOW(). This worked fine until today (may 1), when I open the report now, the first parameter which should be set to April 30 is set to May 31, 2012 while the 2nd is set to Mat 1, 2012 (as it should be)

    Why does the YESTERDAY() function give me a date in the future (the last day of this month)?

    I'm guessing it just tries to go back one day in the month, and then loops back to the end of the month on the 1st but could be wrong. Is there another formula I should be using to do this?

    Also, when I developed the report in the report designer the parameter was presented with the calendar to select the date but the time was also displayed so that I could set the exact time I wanted to use for my query. When deployed to the bi server, it just displays a date.

  2. #2
    Join Date
    Mar 2003
    Posts
    7,950

    Default

    You are probably using a old PRD - this has been fixed in September of last year. Use PRD-3.8.3 and the matching BI-Server 4.1 to have this issue fixed.

    The date-picker only allows you to set the date. But if you give a date-format string as well, then you can enter the time in the text-field next to the date-picker. Make sure you set your parameter to "Date" (NOT the SQL one!) or TimeStamp.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3

    Default

    I'm using prd 3.8.3, and biserver-cr 3.10 (is that what you meant? I don't see 4.1)

    And thanks, I'll play with the parameters a bit to see if I can get them to work

  4. #4
    Join Date
    Mar 2003
    Posts
    7,950

    Default

    3.10 is 4.1 - that version numbering is a bit f'd due to some Pentaho-internal versioning conflicts.
    However, I just had a test, and it does NOT work there. Seems that PRD ships with a rather ancient version of LibFormula.

    If you need a fix right now, just grab LibFormula from the 4.5 release and copy it over. Delete the old version, of course.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  5. #5
    Join Date
    Nov 2008
    Posts
    7

    Default

    Quote Originally Posted by Taqua View Post
    3.10 is 4.1 - that version numbering is a bit f'd due to some Pentaho-internal versioning conflicts.
    However, I just had a test, and it does NOT work there. Seems that PRD ships with a rather ancient version of LibFormula.

    If you need a fix right now, just grab LibFormula from the 4.5 release and copy it over. Delete the old version, of course.
    In the Attachment you'll find the libformula-1.2.5.jar and libformula-ui-1.2.5.jar to solve the problem
    Attached Files Attached Files

Posting Permissions

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