Date conversion

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
kmoorer
Premium Member
Premium Member
Posts: 7
Joined: Mon Aug 20, 2007 12:50 pm
Location: Phila PA

Date conversion

Post by kmoorer »

I have a date coming in format "Tuesday, June 07, 2011".
How can I convert this to yyyy-mm-dd format.
I looked at DateToString, but it looks like it has to be in numeric format.
I can't use Iconv/Oconv becase it's a parallel job.
I could disect the date, remove the day, convert June to 06...
But if there is a better way I would sure like to know.
Kevin Moorer
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

DateToString() would likely not be the correct function as it's expecting a value that is already in a Date column. It sounds like your date is coming in as a string, so maybe StringToDate() would be the first step?

Two more important questions:
- What is your source data type and your target data type?
- Have you searched for "date formats" in the Parallel Job Developer Guide? Quite a few options listed there that should be able to cover your date's format.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
arunkumarmm
Participant
Posts: 246
Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:

Post by arunkumarmm »

Is it not possible for you to use a BASIC transformer and make use of IConv/OConv?
Arun
Post Reply