Page 1 of 1

using transfomer or modify

Posted: Mon Jun 28, 2010 10:08 pm
by harikumar
i have source like this
date
02-06-2010
05-01-2010
23-09-2010


i want to transform target side like this
date
2-6-2010
5-1-2010
23-9-2010

Posted: Mon Jun 28, 2010 10:40 pm
by chulett
Is there a question here? What are your actual source and target datatypes? :?

Posted: Mon Jun 28, 2010 11:46 pm
by venugopal.123
Hi use transformer in that use stage variable and then you can find the first character in the date column is "0" then trim the column else pass the column as it is.... Hope this will help....

Posted: Tue Jun 29, 2010 1:17 am
by ray.wurlod
If your data type is date you will need type conversion functions DateToString() and StringToDate() with different format strings.

If your data type is string you will need Field() functions to unpack the components and Trim() to remove the leading zeroes, then concatenation to re-assemble the date.

In the first case you will have to handle separately one-digit day and one-digit month, one-digit day and two-digit month, two-digit day and one-digit month, and two-digit day and two-digit month, using nested If..Then..Else constructs.