$ 0 0 The number of seconds is extract(hour from ts) * 3600 + extract(minute from ts) * 60 + extract(second from ts) Dieter