DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
praburaj



Group memberships:
Premium Members

Joined: 30 Jun 2005
Posts: 133
Location: philippines
Points: 1398

Post Posted: Sun Feb 06, 2011 2:36 am Reply with quote    Back to top    

DataStage® Release: 8x
Job Type: Parallel
OS: Unix
I have csv source file from that i am getting the date column in the format "dd-mon-yy" but, i need to load into oracle table with the format yyyy-mm-dd. Plz help me how to achieve this.

_________________
prabakaran.v
Ravi.K
Participant



Joined: 20 Nov 2010
Posts: 209
Location: Bangalore
Points: 1191

Post Posted: Sun Feb 06, 2011 3:41 am Reply with quote    Back to top    

Year part is partially avilable. So, whether it could be 20th or 21st Century. So, the below derivation helps for 21st century only. If you have any limitations change accordingly.

DateToString(StringToDate('06-Feb-11','%dd-%mmm-%2000yy'),'%yyyy-%mm-%dd')

_________________
Cheers
Ravi K
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42215
Location: Denver, CO
Points: 216749

Post Posted: Sun Feb 06, 2011 9:16 am Reply with quote    Back to top    

By any chance is your Oracle target column a DATE? If so then you don't need to convert it to any particular format, just convert it to a Date.

_________________
-craig

Watch out where the huskies go and don't you eat that yellow snow
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours