Thread: Converting file -Invalid data format on input DATE

Converting file -Invalid data format on input DATE

From
Fred Wohlfert
Date:
I am converting data from  dBaseIII format trying to load into Postgresql.

I am having a problem with DATE field, the file I am working with does
not have any data for
this field on some records.  I have been fixing other problems with sed,
however I am stumped with this.

Will Postgresql take a null as input for a DATE field?

Does anyone know how to specify the null character in SED?

Thanks in advance.

Re: Converting file -Invalid data format on input DATE

From
Bruno Wolff III
Date:
On Tue, Nov 23, 2004 at 16:36:07 -0500,
  Fred Wohlfert <fredwohlfert@ehbmail.com> wrote:
> I am converting data from  dBaseIII format trying to load into Postgresql.
>
> I am having a problem with DATE field, the file I am working with does
> not have any data for
> this field on some records.  I have been fixing other problems with sed,
> however I am stumped with this.
>
> Will Postgresql take a null as input for a DATE field?

If you mean an empty string, no that isn't a valid date. You can store
SQL NULLs in a date column as long as you don't have any constraints that
would prohibit them.