Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DD5BF4761E3 for ; Tue, 13 Aug 2002 03:03:46 -0400 (EDT) Received: from dyatel.antar.bryansk.ru (dyatel.antar.bryansk.ru [195.239.214.110]) by postgresql.org (Postfix) with ESMTP id 133384761EA for ; Tue, 13 Aug 2002 03:03:46 -0400 (EDT) Received: from fduch by dyatel.antar.bryansk.ru with local (Exim 4.10) id 17eViO-0002qw-00; Tue, 13 Aug 2002 11:03:40 +0400 Date: Tue, 13 Aug 2002 11:03:40 +0400 From: "Alexander M. Pravking" To: Christopher Kings-Lynne Cc: Lonh SENG , pgsql-sql@postgresql.org Subject: Re: Conversion Message-ID: <20020813070339.GA91244@dyatel.antar.bryansk.ru> References: <006e01c24277$83c4cf10$05a00017@idlonh> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/198 X-Sequence-Number: 9044 On Tue, Aug 13, 2002 at 11:32:25AM +0800, Christopher Kings-Lynne wrote: > Is the int4 a UNIX epoch? ie. seconds since 1970? > > If so, then this will generally work: > > SELECT CAST(int4field AS abstime); > > or > > SELECT int4field::abstime; http://www.postgresql.org/idocs/index.php?datatype-datetime.html says: The types abstime and reltime are lower precision types which are used internally. You are discouraged from using any of these types in new applications and are encouraged to move any old ones over when appropriate. Any or all of these internal types might disappear in a future release. Don't they? -- Fduch M. Pravking