Re: reverse of extract epoch? - Mailing list pgsql-general

From Gregory Seidman
Subject Re: reverse of extract epoch?
Date
Msg-id 20020603183205.GA14198@jamaica.cs.brown.edu
Whole thread Raw
In response to Re: reverse of extract epoch?  (Neil Conway <nconway@klamath.dyndns.org>)
List pgsql-general
Neil Conway sez:
} On Sun, 2 Jun 2002 21:17:50 -0400
} "Gregory Seidman" <gss+pg@cs.brown.edu> wrote:
} > Now I want to create its reverse so I can get a timestamp (with tz) from an
} > epoch-based integer. Is there some simple way of doing it?
}
} Try:
}
} select "timestamp"(extract(epoch from now())::int);

Yowza! It's been there all along! I actually wanted timestamptz(), as it
turns out, but I found that easily. Thank you!

} Cheers,
}
} Neil
--Greg


pgsql-general by date:

Previous
From: Andrew Perrin
Date:
Subject: Re: [ADMIN] performance issues with DBI module when data too big
Next
From: "Johnson, Shaunn"
Date:
Subject: invalid type error