Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Display integer as date

  1. #1
    Join Date
    Apr 2009
    Posts
    337

    Default Display integer as date

    Hi,

    I have date values stored as integer in the data warehouse (yyyymmdd) format. Now, when i show it to the user, i need to show it as yyyy-mm-dd or something, is there anything like a conversion mask where i can convert this integer to date in the metadata editor?
    Regards,
    Madhu

  2. #2
    Join Date
    Jan 2011
    Posts
    1

    Default Re: Display integer as date

    in Metadata Editor, select that field properties, Formula, break the link above the field name and type the SQL datetime convert function here. Check the Is the formula exact to Yes. That's all.

  3. #3
    Join Date
    Apr 2009
    Posts
    337

    Default

    Thanks odo!
    I googled the convertion for postgres as there is no direct convert function. This one does the trick for me:

    to_date(to_char(dwh_date_key,'99999999'),'YYYYMMDD')

    Is there any chance to have it in the mask expression and just retain my actual value in the formula?
    Last edited by madhupenta; 11-23-2011 at 08:44 AM.
    Regards,
    Madhu

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.