pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedtimestamp with postgresql 7.3
4+ messages / 3 participants
[nested] [flat]
* timestamp with postgresql 7.3
@ 2003-04-04 20:18 Claude <pgsql-list@easynet.be>
2003-04-04 22:01 ` Re: timestamp with postgresql 7.3 Dan Langille <dan@langille.org>
2003-04-04 22:05 ` Re: timestamp with postgresql 7.3 Stephan Szabo <sszabo@megazone23.bigpanda.com>
0 siblings, 2 replies; 4+ messages in thread
From: Claude @ 2003-04-04 20:18 UTC (permalink / raw)
To: pgsql-sql
Hi,
I have a table a field with timestamps in seconds since epoch and I would
like to get a human readable date... but it seems that postgresql 7.3 does
not support the datetime(), timestamp(), timestamptz() functions...
I tried the example in:
http://archives.postgresql.org/pgsql-bugs/2002-07/msg00117.php
and get:
DB=# select val, datetime(val), "timestamp"(val), timestamptz(val) from test_table;
ERROR: Function datetime(integer) does not exist
Unable to identify a function that satisfies the given argument types
You may need to add explicit typecasts
And tried various typecasts without any success.
Any help?
---
Claude
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: timestamp with postgresql 7.3
2003-04-04 20:18 timestamp with postgresql 7.3 Claude <pgsql-list@easynet.be>
@ 2003-04-04 22:01 ` Dan Langille <dan@langille.org>
1 sibling, 0 replies; 4+ messages in thread
From: Dan Langille @ 2003-04-04 22:01 UTC (permalink / raw)
To: Claude <pgsql-list@easynet.be>; +Cc: pgsql-sql
On 4 Apr 2003 at 22:18, Claude wrote:
>
> Hi,
>
> I have a table a field with timestamps in seconds since epoch and I
> would like to get a human readable date... but it seems that
> postgresql 7.3 does not support the datetime(), timestamp(),
> timestamptz() functions...
>
> I tried the example in:
> http://archives.postgresql.org/pgsql-bugs/2002-07/msg00117.php
>
> and get:
>
> DB=# select val, datetime(val), "timestamp"(val), timestamptz(val)
> from test_table; ERROR: Function datetime(integer) does not exist
> Unable to identify a function that satisfies the given
> argument types You may need to add explicit typecasts
>
> And tried various typecasts without any success.
>
> Any help?
I think you need to read the 7.3 documentation and release notes.
--
Dan Langille : http://www.langille.org/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: timestamp with postgresql 7.3
2003-04-04 20:18 timestamp with postgresql 7.3 Claude <pgsql-list@easynet.be>
@ 2003-04-04 22:05 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2003-04-05 00:21 ` Re: timestamp with postgresql 7.3 Claude <pgsql-list@easynet.be>
1 sibling, 1 reply; 4+ messages in thread
From: Stephan Szabo @ 2003-04-04 22:05 UTC (permalink / raw)
To: Claude <pgsql-list@easynet.be>; +Cc: pgsql-sql
On Fri, 4 Apr 2003, Claude wrote:
> I have a table a field with timestamps in seconds since epoch and I would
> like to get a human readable date... but it seems that postgresql 7.3 does
> not support the datetime(), timestamp(), timestamptz() functions...
I'd say probably something like:
CAST('epoch' as timestamp with time zone) + integerfield * INTERVAL '1 second'
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: timestamp with postgresql 7.3
2003-04-04 20:18 timestamp with postgresql 7.3 Claude <pgsql-list@easynet.be>
2003-04-04 22:05 ` Re: timestamp with postgresql 7.3 Stephan Szabo <sszabo@megazone23.bigpanda.com>
@ 2003-04-05 00:21 ` Claude <pgsql-list@easynet.be>
0 siblings, 0 replies; 4+ messages in thread
From: Claude @ 2003-04-05 00:21 UTC (permalink / raw)
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>; +Cc: pgsql-sql
Thanks, that made the trick.
On Fri, 4 Apr 2003, Stephan Szabo wrote:
>
> On Fri, 4 Apr 2003, Claude wrote:
>
> > I have a table a field with timestamps in seconds since epoch and I would
> > like to get a human readable date... but it seems that postgresql 7.3 does
> > not support the datetime(), timestamp(), timestamptz() functions...
>
> I'd say probably something like:
>
> CAST('epoch' as timestamp with time zone) + integerfield * INTERVAL '1 second'
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2003-04-05 00:21 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-04 20:18 timestamp with postgresql 7.3 Claude <pgsql-list@easynet.be>
2003-04-04 22:01 ` Dan Langille <dan@langille.org>
2003-04-04 22:05 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2003-04-05 00:21 ` Claude <pgsql-list@easynet.be>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox