Thread

  1. datestyle

    PostgreSQL Bugs List <pgsql-bugs@postgresql.org> — 2000-09-09T08:19:09Z

    Bruno LEVEQUE (bruno.leveque@libertysurf.fr) reports a bug with a severity of 2
    The lower the number the more severe it is.
    
    Short Description
    datestyle
    
    Long Description
    I use postgresql 7.0.2 under Linux (slackware 7.1)
    I cannot change the format of the date style with set
    I'm French and I want to use the European format i.e : DD/MM/YYYY and not YYYY/MM/DD
    
    Sample Code
    create table anyname (
    philippe1(# myDate date);
    CREATE
    philippe1=# show datestyle;
    NOTICE:  DateStyle is ISO with US (NonEuropean) conventions
    SHOW VARIABLE
    philippe1=# set datestyle to 'European';
    SET VARIABLE
    philippe1=# show datestyle;
    NOTICE:  DateStyle is ISO with European conventions
    SHOW VARIABLE
    philippe1=# insert into anyname values('31/12/2000');
    INSERT 114889 1
    philippe1=# select * from anyname;
       mydate   
    ------------
     2000-12-31
    (1 row)
    
    
    
    No file was uploaded with this report
    
    
    
  2. Re: datestyle

    Thomas Lockhart <lockhart@alumni.caltech.edu> — 2000-09-11T14:49:30Z

    > I cannot change the format of the date style with set
    > ... I want to use the European format i.e : DD/MM/YYYY and not YYYY/MM/DD...
    > NOTICE:  DateStyle is ISO with European conventions
    > SHOW VARIABLE
    
    The ISO style is YYYY/MM/DD. The "European conventions" in this case
    only affect the interpretation of ambiguous *input*.
    
    You need to specify "Postgres,European" as your date style.
    
                        - Thomas