Date Arithmetic

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Hi Santosh,

you simple have to write a routine in DataStage, which does the work for you.

Wolfgang
Problem Description:

There is a age field in CCYY-MM-DD format.
I need to get the age field in months as numeric value.
Like a person can have age like, 200 months or 525 months and so on so on so forth.
If it getting calclated in decimal then I need to round off to get the whole number. The Database is DB2 and o/s AIX 4.3.Datastage is 5.2
How do I it? If someone would answer in detail, that would be great.


Thanks in advance

Santosh

ldesilvio
Premium Member
Premium Member
Posts: 32
Joined: Thu Mar 27, 2003 6:38 pm
Location: Sewell, NJ

Post by ldesilvio »

Problem Description:

There is a age field in CCYY-MM-DD format.
I need to get the age field in months as numeric value.
Like a person can have age like, 200 months or 525 months and so on so on so forth.
If it getting calclated in decimal then I need to round off to get the whole number. The Database is DB2 and o/s AIX 4.3.Datastage is 5.2
How do I it? If someone would answer in detail, that would be great.


Thanks in advance

Santosh

ldesilvio
Premium Member
Premium Member
Posts: 32
Joined: Thu Mar 27, 2003 6:38 pm
Location: Sewell, NJ

Post by ldesilvio »

Hi,

I don't quite understand your question. Is the person's age from the source in months or are you calculating the age to months and want to convert it to something else?

Lou
Problem Description:

There is a age field in CCYY-MM-DD format.
I need to get the age field in months as numeric value.
Like a person can have age like, 200 months or 525 months and so on so on so forth.
If it getting calclated in decimal then I need to round off to get the whole number. The Database is DB2 and o/s AIX 4.3.Datastage is 5.2
How do I it? If someone would answer in detail, that would be great.


Thanks in advance

Santosh

Post Reply