hi guys,
Is it possible in DataStage to convert text to timestamp
I need it as in my source the EFFDT column is text and in target it is Timestamp.
Thanking u in anticipation,
Regards,
Devesh
Is it possible in DataStage to convert text to timestamp
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 47
- Joined: Thu Sep 16, 2004 5:26 am
- Location: India
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard! :D
The good news is that there are no data types within DataStage. So, if your source data character string is in a valid timestamp format, you can load it straight in to a column whose data type is "TimeStamp".
If your source data character string is not in a valid timestamp format, then you can use substring and concatenation to get it into a valid timestamp format.
You may need to adjust the fractional seconds, or the date picture, depending on your target database.
The good news is that there are no data types within DataStage. So, if your source data character string is in a valid timestamp format, you can load it straight in to a column whose data type is "TimeStamp".
If your source data character string is not in a valid timestamp format, then you can use substring and concatenation to get it into a valid timestamp format.
You may need to adjust the fractional seconds, or the date picture, depending on your target database.
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.
Rightly said by Ray, you can directly write the text to timestamp, if the format is valid timestamp. You have funtion StringtoTimeStamp. But better to directly write the input if in right format else this would unnecessarily increase function call and reduce performance when volume of data is high.
Happy DataStaging
-
- Participant
- Posts: 47
- Joined: Thu Sep 16, 2004 5:26 am
- Location: India
THANKS
ray.wurlod wrote:Welcome aboard! :D
The good news is that there are no data types within DataStage. So, if your source data character string is in a valid timestamp format, you can load it straight in to a column whose data type is "TimeStamp".
If your source data character string is not in a valid timestamp format, then you can use substring and concatenation to get it into a valid timestamp format.
You may need to adjust the fractional seconds, or the date picture, depending on your target database.