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

Re: select to_timestamp('02/26/2011 14:50', 'MM/DD/YYYY HH24MI')

From: akp geek <akpgeek(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: adrian(dot)klaver(at)gmail(dot)com, pgsql-general(at)postgresql(dot)org, Reid(dot)Thompson(at)ateb(dot)com
Subject: Re: select to_timestamp('02/26/2011 14:50', 'MM/DD/YYYY HH24MI')
Date: 2011-02-25 15:42:18
Message-ID: AANLkTik-G7tDvaDgopSQ4+M3J3Z00pg8JoOTu-GRh0OQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
Thank you all for the suggestion and it's very clear to me now


Regards


On Fri, Feb 25, 2011 at 10:02 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:

> 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(at)momjian(dot)us>        http://momjian.us
>  EnterpriseDB                             http://enterprisedb.com
>
>  + It's impossible for everything to be true. +
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

pgsql-general by date

Next:From: Tom LaneDate: 2011-02-25 18:07:12
Subject: Re: slow building index and reference after Sybase to Pg
Previous:From: Bruce MomjianDate: 2011-02-25 15:02:57
Subject: Re: select to_timestamp('02/26/2011 14:50', 'MM/DD/YYYY HH24MI')

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