hai,
we know the way how to subtract between two dates in datastage,but how to subtract between two timestamps..
example:
a) 01-jan-2001 01:30:45:000
b) 04-jan-2001 02:30:45:001
i need to perform a-b & output must be in number of hours. how this could be done in datastage.
it could be great and thankful if anyone help me.....
regards
kk
how to subtract between two timestamps in datastage server
Moderators: chulett, rschirm, roy
Too add some detail to what Craig has illustrated, you can convert a timestamp into a number of seconds by using
Do this for the other timestamp, subtract the two values and then multiply the resulting delta in seconds by 60 to get hours.
Code: Select all
(ICONV(In.Timestamp[1,11],'D4-DMY[2,3,4]')*24*60*60)+(ICONV(In.Timestamp[13,8],'MTS'))+(In.Timestamp[22,3]/1000)
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>