Conversion of ":" in Timestamp to "."

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
mac4rfree85
Participant
Posts: 126
Joined: Thu Jul 01, 2010 11:39 pm

Conversion of ":" in Timestamp to "."

Post by mac4rfree85 »

Hi Guys,

I am getting Time in one column and Date in one Column. Both of them are char fields.

I am concanatening them to form a timestamp using the below codel

Code: Select all

If StringToDecimal(Trim(SAP_to_Trans.ZCAT_UDATE)) = 0 then StringToTimeStamp('19000101',"%yyyy%mm%dd") else StringToTimeStamp(Trim(SAP_to_Trans.ZCAT_UDATE):Trim(SAP_to_Trans.ZCAT_UTIME),"%yyyy%mm%dd%hh%nn%ss")
But i want to replace the : coming in the timestamp to . .

Can somebody help me out with this.

Cheers!!!!
Mac4rfree
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

There is no need to convert your incoming value to Timestamp. You can keep it as CHAR and load it in your table. For changing ':' to '.' Use convert function.
Post Reply