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
dsdv78
Participant
Posts: 17 Joined: Mon Jan 07, 2008 4:58 am
Location: chennai
Post
by dsdv78 » Wed Jan 23, 2008 6:26 am
Hi All,
I have small doubt regarding date converstion... i want to convert string to date in transformer stage..Can any help this one...
Thanks
DSDV
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Jan 23, 2008 7:55 am
What is your small doubt? Have you tried using... StringToDate()?
-craig
"You can never have too many knives" -- Logan Nine Fingers
dsdv78
Participant
Posts: 17 Joined: Mon Jan 07, 2008 4:58 am
Location: chennai
Post
by dsdv78 » Thu Jan 24, 2008 2:43 am
Hi,
I tried string to date and also date to string...
my source contain like that.12/02/1990 0.00009
i want to in target like that.12/02/1990
Thanks
chulett wrote: What is your small doubt? Have you tried using... StringToDate()? ...
DSDV
devidotcom
Participant
Posts: 247 Joined: Thu Apr 27, 2006 6:38 am
Location: Hyderabad
Post
by devidotcom » Thu Jan 24, 2008 4:37 am
Your input string looks like it contains timestamp.
If yes, convert it to timestamp and then to date
AmeyJoshi14
Participant
Posts: 334 Joined: Fri Dec 01, 2006 5:17 am
Location: Texas
Post
by AmeyJoshi14 » Thu Jan 24, 2008 7:13 am
You can use substring...as well
In the transformer define stage variable(varchar) and in that use substring function as :
Link.Column_name[1,10]
and assign this value of the stage variable to desired column.
gnan_gun
Participant
Posts: 30 Joined: Thu Aug 02, 2007 5:31 am
Location: Mumbai, India
Post
by gnan_gun » Wed Feb 06, 2008 3:30 am
Here No need of Stage variable.
In Transformer target column derivation just give as inputcolumn[1, 10] and target column datatype should be date(10).