Convert mmm-yyyy to yyyymm

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
shaminmin26
Participant
Posts: 17
Joined: Mon Apr 21, 2008 9:53 pm
Location: SG

Convert mmm-yyyy to yyyymm

Post by shaminmin26 »

Hi All,

How can i convert mmm-yyyy to yyyymm without using basic transformer? With parallel transformer, there is no oconv and iconv functions.

Thanks in Advance.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Create a "lookup table" of month names (Char(36) stage variable) and use Index() function to find the month name therein. Perform simple arithmetic to get the month number. Use string manipulation to re-format.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply