Re: Re: to_timestamp question

From: Feite Brekeveld <feite(dot)brekeveld(at)osiris-it(dot)nl>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Re: to_timestamp question
Date: 2001-03-21 19:35:32
Message-ID: 3AB90284.67C5488D@osiris-it.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Karel Zak wrote:

> On Wed, Mar 21, 2001 at 06:20:21PM +0100, Feite Brekeveld wrote:
> > Hi,
> >
> > I need to convert thisone into an integer timestamp value:
> >
> > 14:57:55.540 UTC Sun Mar 4 2001
> >
> > How to deal with the milliseconds part (.540) and the timezone UTC ?
>
> Not implmented yet. In 7.2...

... I've found out that ...

tmp_string := '14:57:55.540 UTC Sun Mar 4 2001';
date_part(''epoch'', cast(tmp_string AS DATETIME))

will do the job.

I've got 3600 seconds difference but that probably has to do with my
timezone.

Feite

>
>
> Karel
>
> --
> Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
> http://home.zf.jcu.cz/~zakkr/
>
> C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl

--
Feite Brekeveld
feite(dot)brekeveld(at)osiris-it(dot)nl
http://www.osiris-it.nl
---------------------------------------------------------------------------
Whenever you buy a stock be ready to ride the bull and never get eaten by
the bear.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gilles DAROLD 2001-03-21 19:45:03 Re: Call for platforms
Previous Message Jan Ploski 2001-03-21 19:03:47 Re: Hope it is not too offtopic