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
ksmurthys
Participant
Posts: 35
Joined: Mon Aug 23, 2004 3:02 pm

Date conversion

Post by ksmurthys »

Hi All,

I was trying to load AS/400 DD2 date(YYYY-MM-DD) to SQLSERVER Database(Datetime) i am getting datetime overfolw error eventhough i used Oconv(Iconv,"D-YMD[4,2,2]),"D-YMD[4,2,2]").

ANy help...

Thanks,
Ram.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I think there are routines for SQL Server dates included in the SDK. This topic has been covered a lot. If you do a search and still cannot find it then let us know. I think you are missing the time portion. It is a timestamp in SQL Server, correct?
Mamu Kim
ksmurthys
Participant
Posts: 35
Joined: Mon Aug 23, 2004 3:02 pm

Post by ksmurthys »

Yeh its timestamp.I checked archives but there is no clue.

Ram.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I think all you need is to add the time like

NewDate = OldDate : " 00:00:00"

Do a search for iconv or oconv
Mamu Kim
alexysflores
Participant
Posts: 18
Joined: Mon Jan 12, 2004 7:20 am
Location: USA

Re: Date conversion

Post by alexysflores »

[quote="ksmurthys"]Hi All,

I was trying to load AS/400 DD2 date(YYYY-MM-DD) to SQLSERVER Database(Datetime) i am getting datetime overfolw error eventhough i used Oconv(Iconv,"D-YMD[4,2,2]),"D-YMD[4,2,2]").

ANy help...

Thanks,
Ram.[/quote]

Windoze EBCDIC conversion table has issues , You need to convert EBCDIC character to ASCII equivalent by using DataStage built-in EBCDIC function calls, this will solve your problem.


Alex
Post Reply