Hi All,
I have input is
Date,Time_Posted
------------------
8th November2013,12.30 midnight
21th July2013,8.30pm
13th December2013,8.00pm
9th May2013,12.30 midnight
11th April2013,12.30 midnight.
I want output as
-----------------------
Date,Time_Posted
8-11-2013,12.30 midnight
21-07-2013,8.30pm
13-12-2013,8.00pm
09-05-2013,12.30 midnight
11-04-2013,12.30 midnight
I want to load data into oracle database.
I would appreciate, if somebody can advise.
Date field column loading into Oracle Database?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Use a Field() function to extract the date (everything before the first comma) and time (everything after that comma). Use Left(), Len() and Right() functions to extract the date components, then use date conversion function(s) to convert to date, and finally a data type conversion function to convert that date to a string. (Or just send the date as a DATE).
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.
Oracle target is a DATE or TIMESTAMP but you don't want any time portion in it? And I'm kind of surprised they have 'midnight' at the end of a 12AM time; what do they do for 12PM, add 'noon'?
Regardless, it looks like the only thing that requires any transformation is your date field and Ray has given plenty of advice on that. And there's some discussion here about loading 'timeless' dates in PX / Oracle.
So give it a shot and let us know what issues and / or specific questions you have.
Regardless, it looks like the only thing that requires any transformation is your date field and Ray has given plenty of advice on that. And there's some discussion here about loading 'timeless' dates in PX / Oracle.
So give it a shot and let us know what issues and / or specific questions you have.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers