Character To Date 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
Vivek Vazarkar
Participant
Posts: 30
Joined: Thu Feb 22, 2007 12:39 pm
Location: Mumbai

Character To Date Conversion

Post by Vivek Vazarkar »

Hi All,

My source file .txt having a date value and I'm trying to load it into the Teradata database. The teradata database having DATE column. In the transform the datastage job gets abort with error.

Job_10_TD_SBT_Load..Transform: At row 1, link "ToLoad", while processing column "Scn_Dt"
Value treated as NULL
Attempt to convert String value "2008-09-21" to Date type unsuccessful.

I used Oconv(ToTransform.Scn_Dt,"D-YMD[4,2,2]") function into the transformer.

Please help. Thanks
Thanks & Regards,
Vivek Vazarkar
Mail ID:-vivekvazarkar@indiatimes.com
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Evaluate, how Teradata want to get the data.

(a) only date like 2008-09-24
(b) date-time like 2008-09-24 08:35:24
(e) else

Oconv works only on data you have set a inconv on first.

If you have 24.09.2008 as date-string in the variabe DString a
NewString=iconv(DString,"D.DMY")
changes it to 14878 (=days after 31.12.1967)
then a
oconv(NewString,"D-YMD[4,2,2]")
changes it to:
2008-09-24
Wolfgang Hürter
Amsterdam
tennetiharika
Participant
Posts: 11
Joined: Mon Feb 25, 2008 5:53 am
Location: Hyderabad

Post by tennetiharika »

what is the format u r supposed to convert
Post Reply