Re: to_timestamp busted? - Mailing list pgsql-general

From Eric G. Miller
Subject Re: to_timestamp busted?
Date
Msg-id 20010625000646.A13882@calico.local
Whole thread Raw
In response to to_timestamp busted?  ("Eliel Mamousette" <eliel@panix.com>)
List pgsql-general
On Mon, Jun 25, 2001 at 02:03:55AM -0400, Eliel Mamousette wrote:
> I have gotten some interesting results in testing out date
> conversions using to_timestamp.
>
> Given the query:
>
> [NB: log_date and log_time are both varchar fields.
> Yes I am yet another person parsing web server logs....]
>
[snip]
> But using:
>
> SELECT to_timestamp(log_date || ' ' ||  log_time,
>         'YYYY-MM-DD HH24:MM:SS'),

Take a hard look at your format specification.  Hmm, months and minutes
are the same. Maybe you want "MI" for minutes?

--
Eric G. Miller <egm2@jps.net>

pgsql-general by date:

Previous
From: Karel Zak
Date:
Subject: Re: to_timestamp busted?
Next
From: "Eliel Mamousette"
Date:
Subject: RE: to_timestamp busted?