Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Age calculation !!!

Status
Not open for further replies.

mstr1

Programmer
May 5, 2003
12
IN
Hi,
Can u please give some solution to the following problem?

How to calculate age (today's date - Birthdate) as an attribute using Birthdate in Microstrategy? where the db is Teradata.

Thanks in advance
 
simplest calculation expression is

Year(CurrentDate()) - year(Birthdate)

The Int Server will resolve it to the appropriate teradata syntax for you.

However, it does not take into account exact dates. Another choice is to use the following expression

int((birthdate - currentdate())/365)

good luck.

 
how to get current date in a report/metric?
 
currentDate is a function that ships with MicroStrategy. You can find it under schema objects\functions\datetime
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top