Search found 4 matches

by Lapsusone
Fri Jun 16, 2017 12:45 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Extract time as an Integer from a Timestamp
Replies: 9
Views: 5237

To keep it simple, the job reads from a sequential file a timestamp in the default format and loads the date and time as separate fields in an Oracle database.
by Lapsusone
Fri Jun 16, 2017 9:15 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Extract time as an Integer from a Timestamp
Replies: 9
Views: 5237

No, it's still a Timestamp column. I guess under the hood DataStage treats Timestamp fields as a string.
by Lapsusone
Fri Jun 16, 2017 8:38 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Extract time as an Integer from a Timestamp
Replies: 9
Views: 5237

As anudeepdasari001 mentioned, I used substring and it works this way. I still don't know why the functions I mentioned above don't work.

Code: Select all

EREPLACE(DSLink2.TIMESTAMP[12,8],":","")[1,4]
by Lapsusone
Thu Jun 15, 2017 10:39 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Extract time as an Integer from a Timestamp
Replies: 9
Views: 5237

Extract time as an Integer from a Timestamp

Hello, I'm trying to extract the time from a Timestamp column as an integer. For example, for a timestamp like "2017-06-15 12:30:55", I want to output an integer equal to 1230. I have mainly 2 issues I need to understand: First, I tried using the following function: TimestampToDecimal(DSLi...