Re: to_timestamp busted?

From: "Eric G(dot) Miller" <egm2(at)jps(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: to_timestamp busted?
Date: 2001-06-25 07:06:46
Message-ID: 20010625000646.A13882@calico.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)jps(dot)net>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karel Zak 2001-06-25 08:25:10 Re: to_timestamp busted?
Previous Message Eliel Mamousette 2001-06-25 06:03:55 to_timestamp busted?