Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Function on date in Ad Hoc Reporting

  1. #1
    Join Date
    Jun 2008
    Posts
    4

    Default Function on date in Ad Hoc Reporting

    Is it possible to have more function for date in Ad Hoc reporting because I want to show only the date or only the month in the final report ?
    That function does not exist in the format date output so there is any solution ?

    Tanks

  2. #2
    Join Date
    Apr 2007
    Posts
    2,010

    Default

    Perhaps you could add a fomula field to the metadata which works out the bit of the date you want?

  3. #3
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    if you already have a Date-Column, then you can control what is displayed by changing the format-pattern. A pattern of "MMM" will only show the month, "yyyy" patterns give the year and so on.

    The format-pattern syntax is explained here:
    http://java.sun.com/j2se/1.5.0/docs/...ateFormat.html
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  4. #4
    Join Date
    Nov 2006
    Posts
    135

    Default Setting format of date output in a report using metadata

    The previous two posts sketch a solution to your problem. Here are the details:

    You will need to set the date format for your column of interest in the Pentaho Metadata editor (PME).
    Start the PME
    Locate your column in the tree control on the left, right click on the column, selected "edit...".
    In the Properties->Available tree control (in the middle), make sure that the Model Descriptors->Data Type is set to Date. If not, set it to Date.
    In the same tree control, you will see Miscellaneous->Mask for Number or Date. Modify this property to set the date format string. As Taqua says in his post, the format of this string is consistent with Java's dateformatter.

  5. #5
    Join Date
    Jun 2008
    Posts
    4

    Default

    Thanks I will test it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.