Re: select to_timestamp('02/26/2011 14:50', 'MM/DD/YYYY HH24MI') - Mailing list pgsql-general

From Bruce Momjian
Subject Re: select to_timestamp('02/26/2011 14:50', 'MM/DD/YYYY HH24MI')
Date
Msg-id 201102251502.p1PF2vl17931@momjian.us
Whole thread Raw
In response to Re: select to_timestamp('02/26/2011 14:50', 'MM/DD/YYYY HH24MI')  (Adrian Klaver <adrian.klaver@gmail.com>)
Responses Re: select to_timestamp('02/26/2011 14:50', 'MM/DD/YYYY HH24MI')  (akp geek <akpgeek@gmail.com>)
List pgsql-general
Adrian Klaver wrote:
> test=# select to_timestamp('02/26/2011 14:50', 'MM/DD/YYYY HH24MI');
                                                             
>       to_timestamp
                                                             
> ------------------------
                                                             
>  2011-02-26 14:00:00-08
                                                             
> (1 row)
                                                             
>
> Corrected for the ':':
                                                                                   
>
> test=# select to_timestamp('02/26/2011 14:50', 'MM/DD/YYYY HH24:MI');
                                                             
>       to_timestamp
                                                             
> ------------------------
                                                             
>  2011-02-26 14:50:00-08
                                                             
> (1 row)
>
>
> On 9.0.3 corrected for the ':':
>
> test(5432)aklaver=>select to_timestamp('02/26/2011 14:50', 'MM/DD/YYYY
> HH24:MI');
>       to_timestamp
> ------------------------
>  2011-02-26 14:50:00-08
> (1 row)
>
>
> Seems 9.0+ is stricter on its parsing.

Agreed.  We have made some cleanups to the to_timestamp code in recent
major releases and that is what the user must be seeing.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: select to_timestamp('02/26/2011 14:50', 'MM/DD/YYYY HH24MI')
Next
From: akp geek
Date:
Subject: Re: select to_timestamp('02/26/2011 14:50', 'MM/DD/YYYY HH24MI')