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
Character To Date Conversion
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 30
- Joined: Thu Feb 22, 2007 12:39 pm
- Location: Mumbai
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
(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
Amsterdam
-
- Participant
- Posts: 11
- Joined: Mon Feb 25, 2008 5:53 am
- Location: Hyderabad