Skip site navigation (1) Skip section navigation (2)

Re: null value in date field

From: Keith Keller <kkeller(at)speakeasy(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: null value in date field
Date: 2003-02-18 23:19:26
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Tue, Feb 18, 2003 at 04:13:59PM -0500, Jeff Deroshia wrote:
> I have a form that contains optional DATE fields.  To enter null 
> values, I've tried null, 'null', '', '-', '0', 0, and each time I get 
> one of the following errors:
> ERROR:  Bad numeric input format ''
> ERROR:  Bad date external representation ''
> Is there a correct way to enter null values into DATE fields?


=> create table dummy (mydate date);
=> insert into dummy values (null);
INSERT 3397454 1
=> select * from dummy;
(1 row)

You say you tried null: what was your insert?  What's the table look


public key:
alt.os.linux.slackware FAQ:

In response to

pgsql-novice by date

Next:From: Josh BerkusDate: 2003-02-19 00:25:30
Subject: Re: null value in date field
Previous:From: Andrew McMillanDate: 2003-02-18 21:26:15
Subject: Re: Ordering rows in a table

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group