From: | Christian Rudow <Christian(dot)Rudow(at)thinx(dot)ch> |
---|---|
To: | John Huttley <john(at)mwk(dot)co(dot)nz> |
Cc: | PostgreSQL General <pgsql-general(at)hub(dot)org> |
Subject: | Re: [GENERAL] Date time insertion |
Date: | 1999-06-24 06:02:00 |
Message-ID: | 3771C9D8.8EA1A4D1@thinx.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
dustin sallings wrote:
>
> On Thu, 24 Jun 1999, John Huttley wrote:
>
> None of this matters in a date field, date != datetime
>
> // I use '1999-04-21 21:23:21' type format with sucess.
> // >
> // >I am trying to insert both the date and the time into a datetime field.
> // >
> // >If the field datetime in table v1 is dt, then the following successfully
> // >inserts the date into the datetime field:
> // >
> // >insert into v1 (date) values ('19990401') ;
> // >
> // >However, if I also wanted to retain the time of day, the following does not
> // >work:
> // >
> // >insert into v1 (date) values ('199904011530') ;
> // >
> // >Any hints?
That's what the reference manual has to say :
There are several ways to affect the appearance of date/time types:
The PGDATESTYLE environment variable used by the backend directly
on postmaster startup.
The PGDATESTYLE environment variable used by the frontend libpq on
session startup.
SET DateStyle SQL command.
Chris
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Christian Rudow E-Mail: Christian(dot)Rudow(at)thinx(dot)ch
ThinX networked business services Stahlrain 10, CH-5200 Brugg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Chalmers | 1999-06-24 06:22:14 | Is there an auto incrementing number field? |
Previous Message | Christian Rudow | 1999-06-24 05:49:11 | Re: [GENERAL] Limitation |