If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How can I create a year calculation based on my date received data item

Started by jd, 09 Dec 2009 08:32:08 AM

Previous topic - Next topic

jd

Hello,

I have quesiton, how can I create a year calculation based on my date received data item?


lostmytoy


Sreeni P

leave ur question more specifically, so that we can have an idea about the problem..

according to my level of knowledge, that you have one 'Date' data item , which gives a core Date value...which means (13 feb 2009) like that...wasn't it? any ways if u want to convert this into Years ...first you need to compare it on the current date...
means .....total no of days(years)= current date - previous date(i.e, the dataitem value).

here you can use these two functions to get the difference between dates

1. -age(date_exp)
     
     ex:Today's date=2003-02-05 _age ( 1990-04-30 )
     Result: 120906 that is 12 years, 9 months and 6 days

2._ymdint_between ( date_exp1, date_exp2 )

    _ymdint_between ( 1990-04-30 , 2003-02-05 )
    Result: 120906 that is 12 years, 9 months and 6 days

Here you can use the 'date_exp1' variable as your parameter value(prompt)