Page 1 of 1

convertiong iconv& oconv functions to px.

Posted: Wed Mar 26, 2008 8:13 am
by chvenkat.v
hi,

pls give any help for converting iconv&oconv functions to px.

1) in server i have

Oconv (Iconv (Txfm_input.PMMDATETIME[1,6],'D/DMY'),'D-YMD[4,2,2]')

i need to convert this to px.

2) Oconv ((toTrans.CALLG_PARTY_NO),"MCN") to PX.

3) fmt() function tell me use in server jobs

thnks
venkat

Posted: Wed Mar 26, 2008 8:50 am
by kumar_s
StringToDate and DateToSting would to most of all tricks.

Posted: Wed Mar 26, 2008 9:03 am
by DSguru2B
1) This depends upon your input data type, if it is string then you need DateToString() with the right output mask. If it is date, then no function is required, just change the date representation mask in your output stage by going into the columns tab, right click on your date column and go to extended properties.

2)You can use a CONVERT() function that converts all non numeric characters to an empty space.

3)It depends what you are trying to achieve with the FMT() function.

thnks to kumar and dsguru

Posted: Wed Mar 26, 2008 11:02 pm
by chvenkat.v
my problem is input field i.e. PMMDATETIME as a timestampe datatype. i need to convert this to store date in one output column and hrs (hh) to other output column.

thnks
venkat

Posted: Thu Mar 27, 2008 12:34 am
by ray.wurlod
Then (a) stop thinking like a server developer in your Iconv/Oconv rut, (b) explore all the date/time conversion functions that are available (Appendix A of Parallel Job Developer's Guide would be a good place to start) and (c) be prepared to experiment.