Hi,
I am new to Datastage. I have an issue. It would be great If any one help me out.
I am getting the date field and time field in two different attributes. how can i Concatinate both the fields so that i can store the timestamp in the target.( i tried out concatinate ( : ) operator in the transformer stage but i didnot get the intended result
Concatination of Date and Time
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 34
- Joined: Tue Dec 27, 2005 12:13 am
You are using DataStage PX, so you will need to maintain correct data types in all stages. If your incoming Date and Time columns are strings you can concatenate them together, but then you need to call a datatype conversion routine to convert them to the target datatype. Note that date and timestamp datatypes are different in Oracle, DB/2 and Sybase and you need to know which type you are dealing with in order to choose the correct conversion.
-
- Charter Member
- Posts: 130
- Joined: Mon Sep 06, 2004 3:05 am
- Location: Dubai,UAE
Re: Concatination of Date and Time
Hi,
What is your input field datatype. As Arnd suggested, u have to convert them to char type(If they are not char data type) before concatenating . Once u concatenated, u can convert to whatever data type you have in the target
Rgds,
Rao.
What is your input field datatype. As Arnd suggested, u have to convert them to char type(If they are not char data type) before concatenating . Once u concatenated, u can convert to whatever data type you have in the target
Rgds,
Rao.
Ratan Babu N wrote:Hi,
I am new to Datastage. I have an issue. It would be great If any one help me out.
I am getting the date field and time field in two different attributes. how can i Concatinate both the fields so that i can store the timestamp in the target.( i tried out concatinate ( : ) operator in the transformer stage but i didnot get the intended result
-
- Charter Member
- Posts: 166
- Joined: Wed Mar 16, 2005 6:52 am
- Location: Mumbai, India
Hi Ratan,
If you ned to generate a Timestamp from DATE and TIME fields, Read up on the
Function on Page 1092 of the Parallel Job Developers Guide.
IHTH
If you ned to generate a Timestamp from DATE and TIME fields, Read up on the
Code: Select all
TimestampFromDateTime
IHTH
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>