views:

35

answers:

1

when i do query SUBSTR(e.updatetime - s.updatetime, 1,30) i will get result below +000000001 05:06:47.388000

can this save in java.util.Date? or which java class should i use other than String to ease me retrieve day,minutes,hours...

p/s: e.updatetime is timestamp type

+2  A: 

Start with the separate fields, then join them up as you want.

select extract (day from (time_b-time_a)), 
       extract (hour from (time_b-time_a)), 
       extract (minute from (time_b-time_a)), 
       extract (second from (time_b-time_a)) 
from ....;
Gary