Need Help in Convert DSJobStartTimeStamp to integer

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

Need Help in Convert DSJobStartTimeStamp to integer

Post by mac4rfree85 »

Hi Guys,

I need to convert DSJobStartTimeStamp to integer.

Currently am using the below code to convert it.

Code: Select all

Convert(' ','',Convert(':','',Convert('-','',TimestampToString(DSJobStartTimeStamp,"%yyyy-%mm-%dd %hh:%nn:%ss"))))
Is there any better way to do it?

Cheers!!!!
Mac4rfree
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You only need one Convert() function.

Code: Select all

Convert("-/:. ", "", TimestampToString(DSJobStartTimestamp, "%yyyy-%mm-%dd"))
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mac4rfree85
Participant
Posts: 126
Joined: Thu Jul 01, 2010 11:39 pm

Post by mac4rfree85 »

Thanks Ray, thats all i am looking at :)
Mac4rfree
Post Reply