Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f16NvOx56786 for ; Tue, 6 Feb 2001 18:57:24 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f16NvH926384; Tue, 6 Feb 2001 18:57:17 -0500 (EST) To: jkakar@expressus.com cc: pgsql-sql@postgresql.org Subject: Re: timestamp- milliseconds since epoch output In-reply-to: <20010206103939.A13042@expressus.com> References: <20010206103939.A13042@expressus.com> Comments: In-reply-to jkakar@expressus.com message dated "Tue, 06 Feb 2001 10:39:39 -0800" Date: Tue, 06 Feb 2001 18:57:17 -0500 Message-ID: <26381.981503837@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200102/97 X-Sequence-Number: 1275 jkakar@expressus.com writes: > I've tried using variations of to_char and to_timestamp but can't seem > to get the timestamp as a value of milliseconds since the Epoch (Jan > 1, 1970). regression=# select date_part('epoch','2001-02-05 17:23:26.123456-08'::timestamp); date_part ------------------ 981422606.123456 (1 row) Multiply by 1000 if you feel a strong urge to have it in milliseconds... regards, tom lane