On Mon, Jul 25, 2005 at 10:54:42 +0200,
  Daniel Drotos <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I have a string containing hexa dump of an 4 bytes integer, like 
> '6AF4805C'. Is it possible to convert it somehow to date type in 
> plpgsql (v8.0.0-rc1)? Doc says that date is represented as 4 bytes 
> internaly.
> 
> How can I get internal representation of a date type field? So I would 
> be able to produce hexa dump of it like above...

area=> select x'6AF4805C'::integer::abstime;
        abstime
------------------------
 2026-11-11 08:49:00-06
(1 row)

It looks like the your number probably isn't an offset in seconds from
January 1 1970. But with more knowledge about what it is, you should
be able to turn it into a date or timestamp.

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to