current itme stamp

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
somu_june
Premium Member
Premium Member
Posts: 439
Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road

current itme stamp

Post by somu_june »

Hi,

Iam using current timestamp for loading a UPDATE_TIMESTAMP columm to DB2 table it was loading it as Apr 10,2006 12 :09 : 56 AM 000000 but I want to load it as 20060410120956000000. How t oachieve this. Please correct me if Iam wrong I think DB2 takes current timestamp as Apr 10,2006 12 :09 : 56 AM 000000 by default . Can I load it as I mentioned above and how to achieve that . Please some one help me .


Thanks
Somaraju.
somaraju
opdas
Participant
Posts: 115
Joined: Wed Feb 01, 2006 7:25 am

Re: current itme stamp

Post by opdas »

Assuming that your target table is DB2, and you are mapping UPDATE_TIMESTAMP as current Date() in transformer, its Datastage which converts the timestamp into DB2's readable format.When you view the data , it shows the data in the format you ave mentioned. So when you fire a select querry on the concerend table you can change the timestamp to your desired string format to view.

So you dont have to worry about the format its loading or storing internaly as long as the data is correct.

Regards
Om Prakash
somu_june wrote:Hi,

Iam using current timestamp for loading a UPDATE_TIMESTAMP columm to DB2 table it was loading it as Apr 10,2006 12 :09 : 56 AM 000000 but I want to load it as 20060410120956000000. How t oachieve this. Please correct me if Iam wrong I think DB2 takes current timestamp as Apr 10,2006 12 :09 : 56 AM 000000 by default . Can I load it as I mentioned above and how to achieve that . Please some one help me .


Thanks
Somaraju.
somu_june
Premium Member
Premium Member
Posts: 439
Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road

Re: current itme stamp

Post by somu_june »

Hi Opdas,

Thanks for your help . Please can you tell me how to change the current timestamp to my desired string format.




Thanks,
Somaraju
somaraju
opdas
Participant
Posts: 115
Joined: Wed Feb 01, 2006 7:25 am

Post by opdas »

Try using timestamo to char function in DB2 in the sql ......
Om Prakash


"There are things that are known, and there are things that are unknown, and in between there are doors"
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

TimestampToString Return the string representation of the given timestamp - from Datasetage.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Btw why do you want to do that even?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply