Date

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
bobby
Participant
Posts: 86
Joined: Mon Jul 19, 2004 8:31 pm

Date

Post by bobby »

hi,
i have my date in DSJOBSTARTDATE
dslink2.effdate i was trying dslink2.effdate["2500-01-01 00:00:00.000"]

its giving me blank plz advice abt how i can trnasform it too


"2500-01-01 00:00:00.000"
Thanks
Bobby
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

Hi

First your question is not clear enough to answer. Make sure people who reads understand what you want. This will help them to help you.

Extract first 12 character and use Iconv will be like ....

Iconv(InputCol[1,12],"D-YMD[4,2,2]")

Try this

Thanks
Siva
badri
Participant
Posts: 19
Joined: Mon Jul 12, 2004 2:58 am

Post by badri »

Hi,

You can try this

Ereplace(Oconv(effdate,"DYMD[4,2,2]")," ","-"):Oconv(effdate, "MTHS")

Regards
:)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's not giving you blank, it's giving you zero-length string, because that's what you've asked it to do. Square brackets indicate substringing. Square brackets with a single number indicate rightmost characters. That you gave a string rather than a number will generate a "non-numeric where numeric required; zero used" warning in the job log. That zero has been used indicates that your expression is correctly extracting the right most zero characters from the data.

Do spend some time with the on-line help. Start with BASIC Tasks topic and drill down to your heart's content from there. In particular study about data formatting, and the Iconv and Oconv functions, and the "D" and "MT" conversion specifications.

This forum is not a substitute for reading manuals, nor for undertaking appropriate training. Nor, for that matter, for an English teacher.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bobby
Participant
Posts: 86
Joined: Mon Jul 19, 2004 8:31 pm

Post by bobby »

Ereplace(Oconv(DSLink9.EFF_DT["2500-01-01 00:00:00.000"],"DYMD[4,2,2]")," ","-"):Oconv(DSLink9.EFF_DT["2500-01-01 00:00:00.000"],"MTHS")

Still not working plz guide
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,
What is your expected output?

Ketfos
Post Reply