convert from char data type to date data type

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
deva
Participant
Posts: 104
Joined: Fri Dec 29, 2006 1:54 pm

convert from char data type to date data type

Post by deva »

Hi
In Source I have two columns one is eff_month, eff_year. those data type is char.
I want to load in target as due_date (data type date) as month/year.

I am doing concadination using to_date. in oracle it is working but in data stage I am getting error.

Can any one help me how to do this rek.

we are using 7.1 datastage

Thanks in Advance
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

Re: convert from char data type to date data type

Post by paddu »

deva wrote:I am doing concadination using to_date. in oracle it is working but in data stage I am getting error.

Did you try inserting into due_date field in Toad or anyother query tool you have using to_date function. Did the field accept???
deva
Participant
Posts: 104
Joined: Fri Dec 29, 2006 1:54 pm

Post by deva »

I got the answer we have to use
Oconv(Iconv(Fac_in.COLL_EFFEC_MO: Fac_in.COLL_EFFEC_YR, "D YM"), "D4/")
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You got AN answer. Care to mark the thread as Resolved?
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