Problems with datetime

From: Miguel Montes <montes(at)noc(dot)unc(dot)edu(dot)ar>
To: pgsql-general(at)postgresql(dot)org
Subject: Problems with datetime
Date: 1999-11-18 17:30:15
Message-ID: 383437A6.41CCC1D5@unc.edu.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi
I'm using postgres to track events. I need to insert date and time
of these events, and i'm having trouble when the seconds are 00.
Here is an example with psql

miguel=> create table tmp (d datetime);
CREATE
miguel=> insert into tmp values ('1999-11-18 13:00:00');
INSERT 20585 1
miguel=> select * from tmp;
d
-------------------------------
Thu Nov 18 13:00:60.00 1999 ART
(1 row)

13:00:00 has changed to 13:00:00. Now if I try to insert this value I
get: ERROR: Bad datetime external representation 'Thu Nov 18
13:00:60.00 1999 ART'

I'm using Postgresql 6.5.1, as it comes with Linux Mandrake 6.1.
Thanks in advance
Miguel Montes

Browse pgsql-general by date

  From Date Subject
Next Message Martin Weinberg 1999-11-18 20:07:31 How to efficiently update many records at once
Previous Message Ed Loehr 1999-11-18 16:37:26 Re: sql question