capturing microseconds & computing difference between two dates

Поиск
Список
Период
Сортировка
От Robin Keech
Тема capturing microseconds & computing difference between two dates
Дата
Msg-id 31262893C5E5D2119C4900105A30B3A112D59E@roadrunner.dialogue.net
обсуждение исходный текст
Ответы Re: [SQL] capturing microseconds & computing difference between two dates  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Jerome ALET
Дата:
Сообщение: problem with grant/revoke
Следующее
От: Justin Long
Дата:
Сообщение: