reading date column from teradata API stage

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
abha.kalra
Participant
Posts: 37
Joined: Fri Oct 21, 2005 4:09 am

reading date column from teradata API stage

Post by abha.kalra »

Hi,
I am using teradata API to read the date columns in datastage 8 server edition . When I am viewing the data it is showing the date column value in the datastage internal format. I trying casting the date to char and then change the datatype to char in the column definition. But no good.
Pleas suggest I can I see the actual date instead of internal value.
Thanks and Regards
Abha
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's not "DataStage internal format". What happens if you simply change the data type of that column in the job, with no "casting"? Try Varchar or Timestamp rather than Date. Experiment.
-craig

"You can never have too many knives" -- Logan Nine Fingers
abha.kalra
Participant
Posts: 37
Joined: Fri Oct 21, 2005 4:09 am

Re: reading date column from teradata API stage

Post by abha.kalra »

Thankyou Chuett,
That is also giving me error, but I have used the OCONV function to get the date in the readable format and it has solved my problem
Thanks and Regards
Abha
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It would help future searchers if you posted the specifics of how you used OConv in this context for Teradata date fields. That way there's more than one person that knows how to do this. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
abha.kalra
Participant
Posts: 37
Joined: Fri Oct 21, 2005 4:09 am

Post by abha.kalra »

Thanks for the suggestion. I did the following.
While reading the DateField I did Oconv(DateField ,"D/MDY") in the derivation in transformer stage.
Thanks and Regards
Abha
Post Reply