pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Date
20+ messages / 18 participants
[nested] [flat]

* Date
@ 1998-07-08 09:10 ` Chairudin Sentosa Harjo <tsg@dnet.net.id>
  1 sibling, 0 replies; 20+ messages in thread

From: Chairudin Sentosa Harjo @ 1998-07-08 09:10 UTC (permalink / raw)
  To: pgsql-sql

Hello,

I need help with date.

create table blah
(
  custnum int,
   startdate date,
   enddate date
);

How do I get the "real date" to insert to startdate when
the data is entered?

insert into blah
(custnum, startdate, enddate)
values
(001,???,'NULL');

I need a way to fill in the '???' field.
In oracle I could use
select sysdate from dual;

Regards
Chai





^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: [SQL] Date
@ 1998-07-08 09:52 ` Herouth Maoz <herouth@oumail.openu.ac.il>
  1 sibling, 0 replies; 20+ messages in thread

From: Herouth Maoz @ 1998-07-08 09:52 UTC (permalink / raw)
  To: Chairudin Sentosa Harjo <tsg@dnet.net.id>; +Cc: pgsql-sql

At 12:10 +0300 on 8/7/98, Chairudin Sentosa Harjo wrote:


> I need help with date.
>
> create table blah
> (
>   custnum int,
>    startdate date,
>    enddate date
> );
>
> How do I get the "real date" to insert to startdate when
> the data is entered?
>
> insert into blah
> (custnum, startdate, enddate)
> values
> (001,???,'NULL');
>
> I need a way to fill in the '???' field.
> In oracle I could use
> select sysdate from dual;

First, I recommend that you use datetime, not date. Date is a limited type,
and has less options.

That said, you can use either:

insert into blah
(custnum, startdate, enddate)
values
(001, 'now', null);

Or

values
(001, current_date, null);

See the manpage "pgbuiltin".

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma





^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: [SQL] Date
@ 1998-07-10 05:31 Chairudin Sentosa Harjo <tsg@dnet.net.id>
  0 siblings, 0 replies; 20+ messages in thread

From: Chairudin Sentosa Harjo @ 1998-07-10 05:31 UTC (permalink / raw)
  To: Aleksey Dashevsky <postgres@luckynet.co.il>; +Cc: pgsql-sql

Thank you for all your helps.

The 'datetime' is indeed a better choice.
The 'now' is the answer for my question.

Now, I have one question, that I think it is wierd.

create table blah
(
   custnum int,
   startdate datetime default datetime(now()),
   enddate   datetime
);

FIRST:
insert into blah
(custnum, enddate)
values
(1,'01-JAN-00');

SECOND:
insert into blah
(custnum, enddate)
values
(1,'01-01-00');

THIRD:
insert into blah
(custnum, enddate)
values
(1,'01-01-2000');

FOUR:
insert into blah
(custnum, enddate)
values
(custnum, '01012000');

The first, second and third does the right thing, which is tyring to insert
01 JANUARY 2000, the result in postgres is :
    Sat Jan 01 00:00:00 2000

However, the fourth is wrong, the result in postgres is :
    Wed Aug 02 00:00:00 0102

Could someone tell me why?


Regards
Chai

Aleksey Dashevsky wrote:

> On Wed, 8 Jul 1998, Chairudin Sentosa Harjo wrote:
>
> > Hello,
> >
> > I need help with date.
> >
> > create table blah
> > (
> >   custnum int,
> >    startdate date,
> >    enddate date
> > );
> >
> > How do I get the "real date" to insert to startdate when
> > the data is entered?
> >
> > insert into blah
> > (custnum, startdate, enddate)
> > values
> > (001,???,'NULL');
> >
> > I need a way to fill in the '???' field.
> > In oracle I could use
> > select sysdate from dual;
>
> There are some different ways:
> 1. You can try to use current_date and current_time system varibales.
> 2. You can use constant 'now' casted to appropriate data type, e.g. :
> template1=> select 'now'::date;
>   ?column?
> ----------
> 08-07-1998
> (1 row)
>
> template1=> select 'now'::datetime;
> ?column?
> ----------------------------
> Wed 08 Jul 12:39:22 1998 IDT
> (1 row)
>
> template1=> select 'now'::time;
> ?column?
> --------
> 12:39:25
> (1 row)
>
> 3. There is also now() function:
>
> template1=> select now();
> now
> ----------------------
> 1998-07-08 12:39:47+03
> (1 row)
>
>  It is almost the same as constant 'now', but if you want to create table
> which will have auto-timestamp-field, you need  following syntax:
>
> proba=> create table proba (i int, tt datetime default datetime(now()));
> CREATE
>
> proba=> insert into proba values (1);
> INSERT 2170370 1
> proba=> insert into proba values (2);
> INSERT 2170371 1
> proba=> insert into proba values (7);
> INSERT 2170372 1
> proba=> insert into proba values (989);
> INSERT 2170373 1
> proba=> select * from proba;
>   i|tt
> ---+----------------------------
>   1|Wed 08 Jul 12:54:53 1998 IDT
>   2|Wed 08 Jul 12:54:56 1998 IDT
>   7|Wed 08 Jul 12:54:58 1998 IDT
> 989|Wed 08 Jul 12:55:02 1998 IDT
> (4 rows)






^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* date
@ 1999-06-16 14:35 Roland_DUBOULOZ <Roland.Dubouloz@bull.net>
  1999-06-16 15:55 ` Re: [SQL] date José Soares <jose@sferacarta.com>
  0 siblings, 1 reply; 20+ messages in thread

From: Roland_DUBOULOZ @ 1999-06-16 14:35 UTC (permalink / raw)
  To: pgsql-sql

I have a table like this :
   table  books (name varchar , return_date date)

The field return_date is not initialized :
insert into books values (name1);
insert into books values (namex);

The field return_date is updated when the books is returned like this :

update books set return_date='10-06-1999' where name=xxx;

How can i select all the item where the return_date is not updated ?

a request like this :

select * from books where return_date=''  ????


(actually i initialised the return_date with the values '01-01-0001')



thank you.


-- 
Roland Dubouloz			BULL XS/BU
BULL SA				mailto:Roland.Dubouloz@bull.net
1,Rue de Provence		Phone :+33 (0)4 76 29 77 87
BP 208				Bullcom : 229-7787
38432 Echirolles CEDEX		Office  : A1-052
France				Fax     : +33 (0)4 76 29 70 02



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: [SQL] date
  1999-06-16 14:35 date Roland_DUBOULOZ <Roland.Dubouloz@bull.net>
@ 1999-06-16 15:55 ` José Soares <jose@sferacarta.com>
  0 siblings, 0 replies; 20+ messages in thread

From: José Soares @ 1999-06-16 15:55 UTC (permalink / raw)
  To: Roland_DUBOULOZ <Roland.Dubouloz@bull.net>; +Cc: pgsql-sql



Roland_DUBOULOZ ha scritto:

> I have a table like this :
>    table  books (name varchar , return_date date)
>
> The field return_date is not initialized :
> insert into books values (name1);
> insert into books values (namex);
>
> The field return_date is updated when the books is returned like this :
>
> update books set return_date='10-06-1999' where name=xxx;
>
> How can i select all the item where the return_date is not updated ?
>
> a request like this :
>
> select * from books where return_date=''  ????
>

SELECT * FROM books WHERE return_date IS NULL;

>
> (actually i initialised the return_date with the values '01-01-0001')
>
> thank you.
>
> --
> Roland Dubouloz                 BULL XS/BU
> BULL SA                         mailto:Roland.Dubouloz@bull.net
> 1,Rue de Provence               Phone :+33 (0)4 76 29 77 87
> BP 208                          Bullcom : 229-7787
> 38432 Echirolles CEDEX          Office  : A1-052
> France                          Fax     : +33 (0)4 76 29 70 02

______________________________________________________________
PostgreSQL 6.5.0 on i586-pc-linux-gnu, compiled by gcc 2.7.2.3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jose'





^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* DATE
@ 2001-01-22 17:29 john whale <john.whale@ukdirect.org>
  2001-01-24 10:54 ` Re: DATE Oliver Elphick <olly@lfix.co.uk>
  2001-01-26 18:45 ` Re: DATE Emils Klotins <emils@home.grafton.lv>
  0 siblings, 2 replies; 20+ messages in thread

From: john whale @ 2001-01-22 17:29 UTC (permalink / raw)
  To: pgsql-sql

PLEASE ADVISE HOW I SHOULD ALTER THE COMMAND:

<$NOW;DDMMMM;YYYY>

TO GIVE ME A DATE THAT IS X DAYS FORWARD

ie:  I WISH TO REPRESENT A DATE IN FORM WHICH IS A 7 DAYS FORWARD
OF THE DATE NOW.

REGARDS

JOHN WHALE




^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: DATE
  2001-01-22 17:29 DATE john whale <john.whale@ukdirect.org>
@ 2001-01-24 10:54 ` Oliver Elphick <olly@lfix.co.uk>
  1 sibling, 0 replies; 20+ messages in thread

From: Oliver Elphick @ 2001-01-24 10:54 UTC (permalink / raw)
  To: john whale <john.whale@ukdirect.org>; +Cc: pgsql-sql

john whale wrote:
  >PLEASE ADVISE HOW I SHOULD ALTER THE COMMAND:
  >
  ><$NOW;DDMMMM;YYYY>
  >
  >TO GIVE ME A DATE THAT IS X DAYS FORWARD
  >
  >ie:  I WISH TO REPRESENT A DATE IN FORM WHICH IS A 7 DAYS FORWARD
  >OF THE DATE NOW.

I don't recognise the format you are using, but in standard SQL:

template1=# select CURRENT_DATE as now,
template1-#        CAST (CURRENT_DATE + INTERVAL '7 days' AS DATE) as week;
    now     |    week    
------------+------------
 2001-01-24 | 2001-01-31
(1 row)

Use to_char() for date formatting.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "If anyone has material possessions and sees his
      brother in need but has no pity on him, how can the
      love of God be in him?"
                                    I John 3:17 





^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: DATE
  2001-01-22 17:29 DATE john whale <john.whale@ukdirect.org>
@ 2001-01-26 18:45 ` Emils Klotins <emils@home.grafton.lv>
  1 sibling, 0 replies; 20+ messages in thread

From: Emils Klotins @ 2001-01-26 18:45 UTC (permalink / raw)
  To: pgsql-sql

> PLEASE ADVISE HOW I SHOULD ALTER THE COMMAND:
> 
> <$NOW;DDMMMM;YYYY>
> 
> TO GIVE ME A DATE THAT IS X DAYS FORWARD
> 
> ie:  I WISH TO REPRESENT A DATE IN FORM WHICH IS A 7 DAYS FORWARD
> OF THE DATE NOW.
( now() + '7 days'::interval )::date  (or ::datetime, whichever you 
need)

Emils




^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* RE: DATE
@ 2001-01-24 05:22 Michael Davis <mdavis@sevainc.com>
  0 siblings, 0 replies; 20+ messages in thread

From: Michael Davis @ 2001-01-24 05:22 UTC (permalink / raw)
  To: 'john whale' <john.whale@ukdirect.org>; pgsql-sql

Select now() + 7;

-----Original Message-----
From:	john whale [SMTP:john.whale@ukdirect.org]
Sent:	Monday, January 22, 2001 10:30 AM
To:	'pgsql-sql@postgreSQL.org'
Subject:	DATE

PLEASE ADVISE HOW I SHOULD ALTER THE COMMAND:

<$NOW;DDMMMM;YYYY>

TO GIVE ME A DATE THAT IS X DAYS FORWARD

ie:  I WISH TO REPRESENT A DATE IN FORM WHICH IS A 7 DAYS FORWARD
OF THE DATE NOW.

REGARDS

JOHN WHALE




^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Date
@ 2002-04-03 06:10 cristi <cristi@dmhi.ct.ro>
  2002-04-04 16:41 ` Re: Date Jan Wieck <janwieck@yahoo.com>
  0 siblings, 1 reply; 20+ messages in thread

From: cristi @ 2002-04-03 06:10 UTC (permalink / raw)
  To: pgsql-sql

I have o big problem!
I have a table which has a field by date type.
The date format is mm/dd/yyyy.
When I'm doing this select:
select da from a where da='03-31-2002';
the result is :
03-30-2002
03-30-2002
03-30-2002
I repet: only on '03-31-2002'!

What's going on?

Thanks in advance for any help.

^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: Date
  2002-04-03 06:10 Date cristi <cristi@dmhi.ct.ro>
@ 2002-04-04 16:41 ` Jan Wieck <janwieck@yahoo.com>
  0 siblings, 0 replies; 20+ messages in thread

From: Jan Wieck @ 2002-04-04 16:41 UTC (permalink / raw)
  To: cristi <cristi@dmhi.ct.ro>; +Cc: pgsql-sql

Hi Cristi,

    "looking  for  a  Date" means something slightly different in
    the english language, and if your database is of the opposite
    gender, no wonder that it's a bit confused ;-)

    Never   mind,   could   you  give  us  a  bit  more  detailed
    information?  What's the PostgreSQL version and the output of
    "show datestyle"?


Jan

cristi wrote:
> I have o big problem!
> I have a table which has a field by date type.
> The date format is mm/dd/yyyy.
> When I'm doing this select:
> select da from a where da='03-31-2002';
> the result is :
> 03-30-2002
> 03-30-2002
> 03-30-2002
> I repet: only on '03-31-2002'!
>
> What's going on?
>
> Thanks in advance for any help.
>


--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #





^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Date
@ 2002-04-03 06:12 cristi69 <cristiv69@yahoo.com>
  0 siblings, 0 replies; 20+ messages in thread

From: cristi69 @ 2002-04-03 06:12 UTC (permalink / raw)
  To: pgsql-sql

I have o big problem!
I have a table which has a field by date type.
The date format is mm/dd/yyyy.
When I'm doing this select:
select da from a where da='03-31-2002';
the result is :
03-30-2002
03-30-2002
03-30-2002
I repet: only on '03-31-2002'!

What's going on?

Thanks in advance for any help.

^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: date
@ 2002-10-18 10:24 wishy wishy <wishy66@hotmail.com>
  2002-10-18 18:24 ` Re: date Jean-Luc Lachance <jllachan@nsd.ca>
  2002-10-18 19:19 ` Re: date Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 20+ messages in thread

From: wishy wishy @ 2002-10-18 10:24 UTC (permalink / raw)
  To: pgsql-sql

hi folks,
we have a PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC 2.96
installation on pogo linux 7.2
we are facing a data problem when we do the following
select to_char(to_date('1969-10-22','YYYY-MM-DD'),'YYYY-MM-DD');

ERROR:  Unable to convert date to tm

we have been trying to find a solution for this have you found such
instances before it there a method to over come this.
Any help will be greatly appreciated.
thanks
kris




_________________________________________________________________
Get faster connections -- switch to MSN Internet Access! 
http://resourcecenter.msn.com/access/plans/default.asp




^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: date
  2002-10-18 10:24 Re: date wishy wishy <wishy66@hotmail.com>
@ 2002-10-18 18:24 ` Jean-Luc Lachance <jllachan@nsd.ca>
  1 sibling, 0 replies; 20+ messages in thread

From: Jean-Luc Lachance @ 2002-10-18 18:24 UTC (permalink / raw)
  To: wishy wishy <wishy66@hotmail.com>; +Cc: pgsql-sql

Try 

select to_char( '1969-10-22'::date, 'YYYY-MM-DD');


wishy wishy wrote:
> 
> hi folks,
> we have a PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC 2.96
> installation on pogo linux 7.2
> we are facing a data problem when we do the following
> select to_char(to_date('1969-10-22','YYYY-MM-DD'),'YYYY-MM-DD');
> 
> ERROR:  Unable to convert date to tm
> 
> we have been trying to find a solution for this have you found such
> instances before it there a method to over come this.
> Any help will be greatly appreciated.
> thanks
> kris
> 
> _________________________________________________________________
> Get faster connections -- switch to MSN Internet Access!
> http://resourcecenter.msn.com/access/plans/default.asp
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: date
  2002-10-18 10:24 Re: date wishy wishy <wishy66@hotmail.com>
@ 2002-10-18 19:19 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 20+ messages in thread

From: Tom Lane @ 2002-10-18 19:19 UTC (permalink / raw)
  To: wishy wishy <wishy66@hotmail.com>; +Cc: pgsql-sql

"wishy wishy" <wishy66@hotmail.com> writes:
> we have a PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC 2.96
> installation on pogo linux 7.2
> we are facing a data problem when we do the following
> select to_char(to_date('1969-10-22','YYYY-MM-DD'),'YYYY-MM-DD');

> ERROR:  Unable to convert date to tm

Recent versions of glibc broke mktime() for dates before 1970.
There is a workaround for this silliness in Postgres 7.2.3.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* date
@ 2006-02-10 06:18 superboy143 (sent by Nabble.com) <lists@nabble.com>
  2006-02-10 06:38 ` Re: date A. Kretschmer <andreas.kretschmer@schollglas.com>
  2006-02-10 16:07 ` Re: date Osvaldo Rosário Kussama <osvaldo_kussama@yahoo.com.br>
  0 siblings, 2 replies; 20+ messages in thread

From: superboy143 (sent by Nabble.com) @ 2006-02-10 06:18 UTC (permalink / raw)
  To: pgsql-sql


Hello,

How can I write an sql query in postgresql so that I can insert a date into
a table in the format DD-MM-YYYY, and when I select the date from the table
I should get the date in the same format.
--
View this message in context: http://www.nabble.com/date-t1097526.html#a2865031
Sent from the PostgreSQL - sql forum at Nabble.com.




^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: date
  2006-02-10 06:18 date superboy143 (sent by Nabble.com) <lists@nabble.com>
@ 2006-02-10 06:38 ` A. Kretschmer <andreas.kretschmer@schollglas.com>
  2006-02-10 16:17   ` Re: date Ken Hill <ken@scottshill.com>
  1 sibling, 1 reply; 20+ messages in thread

From: A. Kretschmer @ 2006-02-10 06:38 UTC (permalink / raw)
  To: pgsql-sql

am  09.02.2006, um 22:18:09 -0800 mailte superboy143 (sent by Nabble.com) folgendes:
> 
> Hello,
> 
> How can I write an sql query in postgresql so that I can insert a date into
> a table in the format DD-MM-YYYY, and when I select the date from the table
> I should get the date in the same format.

You can't define the format in the db, but you can define the
output-format with to_char(date, 'DD-MM-YYYY');


HTH, Andreas
-- 
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47215,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    === 



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: date
  2006-02-10 06:18 date superboy143 (sent by Nabble.com) <lists@nabble.com>
  2006-02-10 06:38 ` Re: date A. Kretschmer <andreas.kretschmer@schollglas.com>
@ 2006-02-10 16:17   ` Ken Hill <ken@scottshill.com>
  2006-02-10 16:59     ` Re: date Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 20+ messages in thread

From: Ken Hill @ 2006-02-10 16:17 UTC (permalink / raw)
  To: A. Kretschmer <andreas.kretschmer@schollglas.com>; +Cc: pgsql-sql

On Fri, 2006-02-10 at 07:38 +0100, A. Kretschmer wrote:

> am  09.02.2006, um 22:18:09 -0800 mailte superboy143 (sent by Nabble.com) folgendes:
> > 
> > Hello,
> > 
> > How can I write an sql query in postgresql so that I can insert a date into
> > a table in the format DD-MM-YYYY, and when I select the date from the table
> > I should get the date in the same format.
> 
> You can't define the format in the db, but you can define the
> output-format with to_char(date, 'DD-MM-YYYY');
> 
> 
> HTH, Andreas

You could also try using the data_part() function:

date_part('month',date)||-||date_part('day',date)||-||
date_part('year',date)

But I think Andreas' suggestion is a bit more elegant.

^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: date
  2006-02-10 06:18 date superboy143 (sent by Nabble.com) <lists@nabble.com>
  2006-02-10 06:38 ` Re: date A. Kretschmer <andreas.kretschmer@schollglas.com>
  2006-02-10 16:17   ` Re: date Ken Hill <ken@scottshill.com>
@ 2006-02-10 16:59     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 20+ messages in thread

From: Tom Lane @ 2006-02-10 16:59 UTC (permalink / raw)
  To: ken@scottshill.com; +Cc: A. Kretschmer <andreas.kretschmer@schollglas.com>; pgsql-sql

Ken Hill <ken@scottshill.com> writes:
> On Fri, 2006-02-10 at 07:38 +0100, A. Kretschmer wrote:
>> You can't define the format in the db, but you can define the
>> output-format with to_char(date, 'DD-MM-YYYY');

> You could also try using the data_part() function:

Setting the DateStyle parameter may also be of use, particularly on the
input side.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 20+ messages in thread

* Re: date
  2006-02-10 06:18 date superboy143 (sent by Nabble.com) <lists@nabble.com>
@ 2006-02-10 16:07 ` Osvaldo Rosário Kussama <osvaldo_kussama@yahoo.com.br>
  1 sibling, 0 replies; 20+ messages in thread

From: Osvaldo Rosário Kussama @ 2006-02-10 16:07 UTC (permalink / raw)
  To: pgsql-sql; superboy143@gmail.com

superboy143 (sent by Nabble.com) wrote:

>Hello,
>
>How can I write an sql query in postgresql so that I can insert a date into
>a table in the format DD-MM-YYYY, and when I select the date from the table
>I should get the date in the same format.
>  
>

See postgresql.conf documentation
(http://www.postgresql.org/docs/8.1/interactive/runtime-config-client.html#RUNTIME-CONFIG-CLIENT-FORM...):
17. Server Configuration
17.10.2. Locale and Formatting

DateStyle = 'German, dmy'
- output format specification: German
- input/output specification for year/month/day ordering: DMY


postgres=# SHOW datestyle;
  DateStyle
-------------
 German, DMY
(1 row)

postgres=# SELECT CURRENT_DATE;
    date
------------
 10.02.2006
(1 row)

postgres=# SELECT to_char('09/03/2005'::date,'dd/mon/yyyy');
   to_char
-------------
 09/mar/2005
(1 row)

[]s
Osvaldo



		
_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
http://br.acesso.yahoo.com



^ permalink  raw  reply  [nested|flat] 20+ messages in thread


end of thread, other threads:[~2006-02-10 16:59 UTC | newest]

Thread overview: 20+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-07-08 09:10 ` Chairudin Sentosa Harjo <tsg@dnet.net.id>
1998-07-08 09:52 ` Herouth Maoz <herouth@oumail.openu.ac.il>
1998-07-10 05:31 Re: [SQL] Date Chairudin Sentosa Harjo <tsg@dnet.net.id>
1999-06-16 14:35 date Roland_DUBOULOZ <Roland.Dubouloz@bull.net>
1999-06-16 15:55 ` Re: [SQL] date José Soares <jose@sferacarta.com>
2001-01-22 17:29 DATE john whale <john.whale@ukdirect.org>
2001-01-24 10:54 ` Re: DATE Oliver Elphick <olly@lfix.co.uk>
2001-01-26 18:45 ` Re: DATE Emils Klotins <emils@home.grafton.lv>
2001-01-24 05:22 RE: DATE Michael Davis <mdavis@sevainc.com>
2002-04-03 06:10 Date cristi <cristi@dmhi.ct.ro>
2002-04-04 16:41 ` Jan Wieck <janwieck@yahoo.com>
2002-04-03 06:12 Date cristi69 <cristiv69@yahoo.com>
2002-10-18 10:24 Re: date wishy wishy <wishy66@hotmail.com>
2002-10-18 18:24 ` Re: date Jean-Luc Lachance <jllachan@nsd.ca>
2002-10-18 19:19 ` Re: date Tom Lane <tgl@sss.pgh.pa.us>
2006-02-10 06:18 date superboy143 (sent by Nabble.com) <lists@nabble.com>
2006-02-10 06:38 ` Re: date A. Kretschmer <andreas.kretschmer@schollglas.com>
2006-02-10 16:17   ` Re: date Ken Hill <ken@scottshill.com>
2006-02-10 16:59     ` Re: date Tom Lane <tgl@sss.pgh.pa.us>
2006-02-10 16:07 ` Re: date Osvaldo Rosário Kussama <osvaldo_kussama@yahoo.com.br>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox