Page 1 of 1

Date

Posted: Sat Aug 21, 2004 2:47 pm
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

Posted: Sat Aug 21, 2004 8:54 pm
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

Posted: Mon Aug 23, 2004 12:28 am
by badri
Hi,

You can try this

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

Regards
:)

Posted: Mon Aug 23, 2004 1:30 am
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.

Posted: Mon Aug 23, 2004 12:47 pm
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

Posted: Mon Aug 23, 2004 2:48 pm
by ketfos
Hi,
What is your expected output?

Ketfos