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
using transfomer or modify
Moderators: chulett, rschirm, roy
using transfomer or modify
Last edited by harikumar on Mon Jun 28, 2010 11:25 pm, edited 1 time in total.
-
- Participant
- Posts: 9
- Joined: Sun Jun 27, 2010 11:52 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.