Page 1 of 2

date conversion

Posted: Fri Jul 22, 2005 2:12 pm
by studyguy2001
hello.,

i am new to datastage.

my inut date format is : YYYY-MM-DD
THE Output date format has to be : DD-MM-YYYY

can anyone please tell me how do i do it in transformer.

also can anyone please tell me how do i set flag status to either YES or NO in a transformer.


thanks
mark

Posted: Fri Jul 22, 2005 4:43 pm
by ray.wurlod
Did you search the forum? What did you turn up? This post for example may prove informative.

Posted: Sat Jul 23, 2005 4:32 am
by kumar_s
hi mark,
As ray indicated, if u make a search in this forum, you can get at most all of your basic doubts cleared.
you can acheive your requirement by many ways,
one way can be as follows

Code: Select all

Oconv(Iconv("data value","D2-YMD[422]),"D2-DMY[224])
And regarding your flag setting, is that u want to set a column as YES and NO based on any other column or a value, is this case u can very well use

Code: Select all

If <condition1> Then "YES" Else "NO"
-kumar

Posted: Sat Jul 23, 2005 5:02 am
by elavenil
This OConv/IConv functions available when you use Basic transformer not for Parallel transformer. Pls keep in mind that when you use transformer to achieve this.

Regards
Saravanan

Posted: Sat Jul 23, 2005 5:13 am
by kumar_s
elavenil wrote:This OConv/IConv functions available when you use Basic transformer not for Parallel transformer. Pls keep in mind that when you use transformer to achieve this.
Saravanan, i never knew this.
do mean to say that the transformer in parellel extender is quite different from the server edition transformer stage. :roll:

Posted: Sat Jul 23, 2005 5:24 am
by elavenil
Yes. It is.

If you are using Parallel transformer, most of the functions cannot be used. In order to call those functions, the BASIC transformer is to be used.

Regards
Saravanan

Posted: Sat Jul 23, 2005 5:17 pm
by ray.wurlod
It is VERY different. For a start it generates C++ rather than BASIC. Try it; you will see different operands in the expression editor. And you will see "data type" as an extra grid in stage variable declaration (one of the more common traps for those converting from server jobs).

Posted: Sun Jul 24, 2005 3:00 am
by kumar_s
can we use Basic transformer(I assume basic transformer is just transformer in the server edition) in parellel extender(DSEE)

regards
kumar

Posted: Sun Jul 24, 2005 5:54 am
by elavenil
Basic transformer can be used DS EE.

Regards
Saravanan

Posted: Sun Jul 24, 2005 6:37 pm
by bchau
yes it can, but I dont think your job will run in parallel in a basic transformer. It does become a bottleneck of a parallel job from what i hear.

clarification..

Posted: Sun Jul 24, 2005 11:00 pm
by narayana_382
hi saravan,

kindly tell me what does D2-YMD[422]),"D2-DMY[224] this part of the IConv function exactly... does??

naraine.

Re: clarification..

Posted: Mon Jul 25, 2005 1:11 am
by kumar_s
narayana_382 wrote:hi saravan,

kindly tell me what does D2-YMD[422]),"D2-DMY[224] this part of the IConv function exactly... does??

naraine.
hi naraine,

it i simply converting

Code: Select all

YYYY-MM-DD formate to DD-MM-YYY
in D@-YMD[4,2,2] Y is for year which has 4 digit, likewise month and day.

Do a search in this forum or go thorugh the document for more clear information.

regards
kumar

Re: clarification..

Posted: Mon Jul 25, 2005 1:12 am
by bchau
narayana_382 wrote:hi saravan,

kindly tell me what does D2-YMD[422]),"D2-DMY[224] this part of the IConv function exactly... does??

naraine.
YMD corresponds to year/month/day....the [422] indicates a format like YYYY-MM-DD

DMY[224] ---> DD-MM-YYYY

Posted: Mon Jul 25, 2005 1:12 am
by ray.wurlod
Open Designer Help. Find OCONV. Find the hyperlink to D. Read on...

Posted: Mon Jul 25, 2005 1:13 am
by ArndW
Kumar,

go to the on-line PDF manuals and open up Ascential DataStage Basic Guide to page 804; it will explain the date conversion codes.