Page 1 of 1

Date conversion in PX

Posted: Tue Feb 10, 2004 1:42 am
by praj
Hi,

How do we handle date conversions in PX?

For server jobs, we can use iconv and oconv but in PX theres no such option. So then how to handle dates which are not in standard formats?
For ex: if you have a date like 24-dec-2003, there is no way but to have a file with dec->12 mapping and using this file as lookup.

ne help regarding same!!!!
TIA,
Praj

Re: Date conversion in PX

Posted: Tue Feb 10, 2004 7:41 am
by Teej
praj wrote:For ex: if you have a date like 24-dec-2003, there is no way but to have a file with dec->12 mapping and using this file as lookup.
Build a large if then statement within the stage variables within the Transform stage that read in the the month string and convert them to numbers. Then do a StringToTimeStamp().

-T.J.

Posted: Tue Feb 10, 2004 10:20 pm
by praj
Thanx Teej,

That is what i have done but dont u think it will make process lil slow.

I thought of writing one single server job, in between my parallel jobs, for these kind of conversions, but then one will miss out the crux of PX.

Regards,
Praj

Posted: Wed Feb 11, 2004 12:53 pm
by Teej
praj wrote:Thanx Teej,

That is what i have done but dont u think it will make process lil slow.

I thought of writing one single server job, in between my parallel jobs, for these kind of conversions, but then one will miss out the crux of PX.

Regards,
Praj
Do what I would do: Implement all possible solutions, and run a test of 1 million rows with all possible solutions, and see how the performance holds up.

I found that the performance held up pretty well for the if/then statement within PX. Difference in time processed was minimal compared to using a Buildop. In fact, Transform solution sometimes performs better than the buildop solution.

-T.J.