I have a job that reads in a timestamp of 1900-01-01 00:00:00.000 and I want to read it out to a sequential file as 1900-01-01 00:00:00. The problem is DataStage for some reason is not reading the 1900-01-01 properly. The other date statements will convert properly but not this one.
The statement we are using is (eff_start_dt in this case happens to be 1900-01-01 for all records)
Oconv(Iconv(seqCodeTypeIn.eff_start_dt,"D-YMD[4,2,2]"),"D-YMD[4,2,2]") : " " : Oconv(Iconv("00:00:00")"MTS"),"MTS")
The resulting date for this statement is 00:00:00.
If I get the substring of seqCodeTypeIn.eff_start_dt to get just the date portion of the timestamp then I get the right results.
My question is this: Is the date 1900-01-01 a special date in DataStage? Why would the same statement handle any other date (so far ) and not 1900-01-01?
Thanks.
Date Conversion
Moderators: chulett, rschirm, roy
No, there's no special date. Why not just do a LEFT(yourdate, 19) or FIELD(yourdate, ".",1) instead of all the manipulation you're doing. Everything is a string inside DS, so just lop off the last 4 characters.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle