HOW TO SUBTRACT 5 HOURS FROM TIMESTAMP FIELD

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
G.K.K
Participant
Posts: 61
Joined: Tue May 13, 2008 6:54 am

HOW TO SUBTRACT 5 HOURS FROM TIMESTAMP FIELD

Post by G.K.K »

HI,

I have a timestamp field which has values
'2010-01-10 06.01.00.00'
'2010-01-10 05.01.00.00' .
From the above i have to subtract 5 hours. so my o/p should look like as below:
'2010-01-10 01.01.00.00'
'2010-01-09 19.01.00.00'.
please help me in achieving this.

Thanks In Advance
kamal
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Code: Select all

TimestampFromSecondsSince(-18000,'2010-01-10 06.01.00.00')
18000 seconds for 5 hours
You are the creator of your destiny - Swami Vivekananda
Post Reply