My problem is related to the insert a date in a database having a date
as text. With your suggestion I use the database to convert a string to
another string.
I make another test using the function to_timestamp with this result:
gturn2=> select to_timestamp('1973/06/03','/mm/dd');
to
On 7.3.2 and 7.3.4 obtain the same result:
template1=# select '03/06/1973'::date;
date
1973-03-06
(1 row)
template1=# select '02/06/1973'::date;
date
1973-02-06
(1 row)
template1=# select '06/03/1973'::date;
date
1973-06-03
(1 row)
template
Jord Tanner <[EMAIL PROTECTED]> writes:
> This is not a bug, but simply due to postgres date formatting.
Yes, it's a bug, but it's specific to the Europe/Rome timezone setting.
I've not yet had a chance to figure out the details.
regards, tom lane
This is not a bug, but simply due to postgres date formatting. Observe
thus:
gbi=# set datestyle to 'iso';
SET
gbi=# select to_date('03/06/1973','dd/mm/');
to_date
1973-06-03
(1 row)
gbi=# set datestyle to 'us';
SET
gbi=# select to_date('03/06/1973','dd/mm/');
to_
I think this is what you wanted.
select to_char('03/06/1973'::date,'dd/mm/');
you were casting the string to a date and returning a
date. so it would return it in a format that your
system is set to return.
agencysacks=# select
to_char('03/06/1973'::date,'dd/mm/');
to_char
Torello Querci <[EMAIL PROTECTED]> writes:
> If I send this statement
> select to_date('03/06/1973','dd/mm/');
> in the psql interface I obtain
> to_date
>
> 1973-06-02
What timezone are you in? What do you get from
select to_timestamp('03/06/1973','dd/mm/');
Am Mittwoch, 10. September 2003 12:52 schrieb Torello Querci:
> Hi to all,
>
> I have a problem storing 1973/06/03 date.
>
> If I send this statement
>
> select to_date('03/06/1973','dd/mm/');
>
> in the psql interface I obtain
>
> to_date
>
> 1973-06-02
>
> I test this state
On Wed, Sep 10, 2003 at 12:52:22PM +0200, Torello Querci wrote:
> Hi to all,
>
> I have a problem storing 1973/06/03 date.
>
> If I send this statement
>
> select to_date('03/06/1973','dd/mm/');
>
> in the psql interface I obtain
>
> to_date
>
> 1973-06-02
>
> I test t
On my 7.4 this select works fine
testdb011=> select to_date('03/06/1973','dd/mm/');
to_date
1973-06-03
Pavel
On Wed, 10 Sep 2003, Torello Querci wrote:
> Hi to all,
>
> I have a problem storing 1973/06/03 date.
>
> If I send this statement
>
> select to_date('03/06/
Hi to all,
I have a problem storing 1973/06/03 date.
If I send this statement
select to_date('03/06/1973','dd/mm/');
in the psql interface I obtain
to_date
1973-06-02
I test this statement with Postgres 7.3.2 and 7.3.4 packaged withMandrake 9.1
and Mandrake 9.2RC1 and
10 matches
Mail list logo