Page 2 of 2

Posted: Fri Mar 10, 2006 4:12 pm
by ray.wurlod
For one week only, all is revealed!

Posted: Thu Apr 06, 2006 2:04 pm
by Titto
Hi Ray,
ray.wurlod wrote:For small volume of data, a BASIC Transformer stage could serve here. Use

Code: Select all

Oconv(Iconv(TheDate, "D"), "DQ")
to generate the quarter number (1, 2, 3 or 4). Then take the remainder after dividing the quarter number into the month number, added to the month number. Use the Mod() function to get the remainder after integer division.

For larger volumes use a lookuptable in the Modify stage (function lookup_int16_from_string or lookup_string_from_int16 for example) to convert the month number to a quarter number. Then proceed as above in a Transformer stage. Or build the lookup as a delimited string "1,1,1,2,2,2,3,3,3,4,4,4" in a stage variable in a Transformer stage and use the Field() function to extract the appropriate quarter based on the month number then again proceed as above.
I was wondering - for the first part i can't use that in PX. But could you please dirve me using an example.

thanks

Posted: Thu Apr 06, 2006 3:45 pm
by ray.wurlod
You CAN use it in PX, via a BASIC Transformer stage.