to_timestamp question

Started by Feite Brekeveldabout 25 years ago2 messagesgeneral
Jump to latest
#1Feite Brekeveld
feite.brekeveld@osiris-it.nl

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 ?

Thanks,

--
Feite Brekeveld
feite.brekeveld@osiris-it.nl

#2Feite Brekeveld
feite.brekeveld@osiris-it.nl
In reply to: Feite Brekeveld (#1)
Re: Re: to_timestamp question

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@zf.jcu.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.brekeveld@osiris-it.nl
http://www.osiris-it.nl
---------------------------------------------------------------------------
Whenever you buy a stock be ready to ride the bull and never get eaten by
the bear.