Page 1 of 1

Date conversion

Posted: Wed Oct 20, 2004 11:01 am
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.

Posted: Wed Oct 20, 2004 2:42 pm
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?

Posted: Wed Oct 20, 2004 2:50 pm
by ksmurthys
Yeh its timestamp.I checked archives but there is no clue.

Ram.

Posted: Wed Oct 20, 2004 3:51 pm
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

Re: Date conversion

Posted: Wed Oct 20, 2004 4:22 pm
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