Re: to_timestamp busted?

Eric G. Miller <egm2@jps.net>

From: "Eric G. Miller" <egm2@jps.net>
To: pgsql-general@postgresql.org
Date: 2001-06-25T07:06:46Z
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@jps.net>