On Wed, Apr 23, 2003 at 16:28:27 +0200,
Craig Elston <CElston@PICsolutions.com> wrote:
>
> When trying to insert a date into a table using HTML Forms & PHP, PGAdminII,
> WINSql and even psql on the server I get the following error.
>
> Query failed: ERROR: Bad date external representation
> The syntax I am using is bog simple.
>
> INSERT INTO repairs VALUES
> (nextval('repairs_id_seq'), '$date', '$username', '$item',
> '$serialnumber', '$fault', '$company', '$jobcard', '$datereturned',
> '$comments')
What do the values of $date and $datereturned look like?
Note in particular that '' is not a valid date value. You need to use
NULL if you want a null value.