capturing microseconds & computing difference between two dates - Mailing list pgsql-sql

From Robin Keech
Subject capturing microseconds & computing difference between two dates
Date
Msg-id 31262893C5E5D2119C4900105A30B3A112D59E@roadrunner.dialogue.net
Whole thread Raw
Responses Re: [SQL] capturing microseconds & computing difference between two dates  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Hi,  I'm pulling my hair out.  Can anyone help?

I have a table with start and end dates ... type : TimeStamp.  (offers
microsecond resolution according to the docs)
I insert datetime information with microsecond resolution 
ie
INSERT INTO table (Start_Date, End_Date) VALUES ('2000-01-01
10:01:00.123456' , '2000-01-01 10:01:00.654321')

What I want is to get the difference between these two times - normally
only microseconds.  

However, PostgreSQL 6.5 doesn't seem to hold the microsecond portion, or
if it does it does not display it.

I have set the DateStyle to SQL -> this should stop the default ISO
Format from displaying the timezone difference on the end of the
timestamp (ie +00), but it doesn't.

DateTime is no good for me becasue it only offers millisecond precision
(ie 2 decimal places).

Can anyone help?  Should I just relax and get used to counting sunsets
instead?

Thanks
Robin


pgsql-sql by date:

Previous
From: Jerome ALET
Date:
Subject: problem with grant/revoke
Next
From: Justin Long
Date:
Subject: