Conversion

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
karry450
Participant
Posts: 201
Joined: Wed Nov 14, 2007 11:31 pm
Location: HYD

Conversion

Post by karry450 »

Hi Friends,

I have a input DATE column which is in DD/MM/YYYY format and the problem is Im unable to do a conversion of

CURRENT DATE - DATE and my target colum is a number.

can anyone help me coverting this in datastage server jobs.

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What have you tried? Short answer is convert both to internal format and subtract. And as to your 'target column is a number'... of what? Difference in days? If so, then you should be fine if you do as noted.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

System variable @DATE does not require conversion, as it is already in internal format. The same is true of the Date() function. Therefore you are looking for an expression something like

Code: Select all

@DATE - Iconv(InLink.TheDate, "DDMY")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply