Monday, November 18, 2013

Cognos: Age calculation


We have two ways to calculate age in years and age in yy years mm months and dd days format


Calculate Age in years...

Create a query Calculation as below...

_years_between (current_date, [Birth date column])

Calculate Age in yy years, mm months and dd days format...
(replace [Birth Date] with your own Data of birth column)


substring (cast(_ymdint_between  (current_date, [Birth date]),char(6)),1,2) || ' Years '||

substring (cast(_ymdint_between  (current_date, [Birth date]),char(6)),3,2)

|| ' months ' ||

substring (cast(_ymdint_between  (current_date, [Birth date]),char(6)),5,2)

|| ' Days '



3 comments:

  1. Hi,

    find Age Calculator then it is Overall looking for a Chronological age or anniversary calculator then this is your best option in age Calculator.

    Age Calculator By Date Of Birth (Days, Months)
    Calculation of age with interesting details!
    If you want to know the details of your age, then install the Age Calculator

    ReplyDelete
  2. Find your age with the assistance of particular handy age calculator. You can readily calculate age in years, months, days, weeks, hours, and minutes together with the assistance of the birthday calendar.

    ReplyDelete
  3. Great Work, after reading this post I felt comfortable with this post thank you very much
    TM1 Online Training
    TM1 Training

    ReplyDelete