pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Clark Evans <clark.evans@manhattanproject.com>
To: chairudin@prima.net.id
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] TO_CHAR or TO_DATE
Date: Wed, 31 Mar 1999 14:27:33 +0000
Message-ID: <370230D5.DA694942@manhattanproject.com> (raw)
References: <Pine.LNX.4.05.9903121402040.27807-100000@michel.enter.it>
	<37020847.8DBA2C2E@prima.net.id>

Chairudin Sentosa wrote:
> How to do it the right way to insert only month and year?

You don't, it is necessary to have a day as well.  Use
the first of the month, and ignore the day in your program.
Thus, insert into table values ( '1-MAR-1999' );

Alternatively, you could create your own type and work out
all the semantics necessary to only manage months.  This sounds
interesting actually, only I would do 'week' rather than month.

Clark



view thread (2+ messages)

Message-ID: <370230D5.DA694942@manhattanproject.com>
Permalink:  ../370230D5.DA694942@manhattanproject.com/
Also on:    postgresql.org/message-id/370230D5.DA694942@manhattanproject.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: clark.evans@manhattanproject.com, chairudin@prima.net.id
  Subject: Re: [SQL] TO_CHAR or TO_DATE
  In-Reply-To: <370230D5.DA694942@manhattanproject.com>
  References: <Pine.LNX.4.05.9903121402040.27807-100000@michel.enter.it> <37020847.8DBA2C2E@prima.net.id> <370230D5.DA694942@manhattanproject.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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