timestamp- milliseconds since epoch output

From: jkakar(at)expressus(dot)com
To: pgsql-sql(at)postgresql(dot)org
Subject: timestamp- milliseconds since epoch output
Date: 2001-02-06 18:39:39
Message-ID: 20010206103939.A13042@expressus.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I'm using a timestamp field called date_created. Whenever I select it
I get:

select date_created from tbl_user;
date_created
------------------------
2001-02-05 17:23:26-08
2001-02-05 17:45:39-08
2001-02-03 03:58:53-08
(3 rows)

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). I've been looking through the user manual but can't seem to
find anything... might be nice to put it in there as this is probably
a very common operation.

Any ideas?

Thanks,
Jamu.

--
Jamu Kakar (Developer) Expressus Design Studio, Inc.
jkakar(at)expressus(dot)com 708-1641 Lonsdale Avenue
V: (604) 903-6994 North Vancouver, BC, V7M 2J5

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Karel Zak 2001-02-06 18:42:42 Re: type casting: varchar to date
Previous Message J.Fernando Moyano 2001-02-06 18:20:57 type casting: varchar to date