diff between two timestamps.

From: HK <harikrishnan(at)midascomm(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: diff between two timestamps.
Date: 2003-07-29 10:07:04
Message-ID: Pine.LNX.4.33.0307291534070.7082-100000@mallard.midascomm.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi all,
Can i get the difference between two timestamps in seconds.
If i use
t1 timestamp;
t2 timestamp;
select t1 - t2;
i get something like "10 days" or "00:10".

Can i get the number of seconds elapsed between the two timestamps.
Plz help me. I am trying the first time using the stored procedures.
TIA.

--
luv,
hari
__
/ / __ _ _ _ _ __ __ -o)
/ /__ / / / \\// //_// \\ \\/ / /\\\\ Making things happen
/____/ /_/ /_/\\/ /___/ /_/\\_\\ _\\_v-

-------------------------------------------------------------------
Midas Communications (p) Ltd,
Chennai.
Ph (O) 24512050. Extn : 321
Ph (R) 26161105.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Mel Jamero 2003-07-29 10:15:46 any idea regarding this error?
Previous Message Mel Jamero 2003-07-29 09:06:35 help: now() + N is now failing!