Skip site navigation (1) Skip section navigation (2)

BUG #2599: AM/PM doesn't work in to_timestamp in the middle of a string

From: "Josh Tolley" <eggyknap(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2599: AM/PM doesn't work in to_timestamp in the middle of a string
Date: 2006-08-30 17:29:56
Message-ID: 200608301729.k7UHTuBp020358@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      2599
Logged by:          Josh Tolley
Email address:      eggyknap(at)gmail(dot)com
PostgreSQL version: 8.1.4
Operating system:   Fedora Core 5
Description:        AM/PM doesn't work in to_timestamp in the middle of a
string
Details: 

eggyknap=# select to_timestamp('30 Aug 06:01:03.223 PM 2006', 'DD Mon
HH:MI:SS.MS AM YYYY'), to_timestamp('30 Aug 2006 06:01:03.223 PM', 'DD Mon
YYYY HH:MI:SS.MS AM');
       to_timestamp        |        to_timestamp
---------------------------+----------------------------
 0001-08-30 18:01:03-08 BC | 2006-08-30 18:01:03.223-06

This appears to happen when AM/PM isn't the last element in the string.

Responses

pgsql-bugs by date

Next:From: Christopher BrowneDate: 2006-08-30 17:50:44
Subject: BUG #2600: dblink compile with SSL missing libraries
Previous:From: Charlie SavageDate: 2006-08-30 16:59:24
Subject: Re: BUG #2594: Gin Indexes cause server to crash on Windows

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group