| From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
|---|---|
| To: | Craig Elston <CElston(at)PICsolutions(dot)com> |
| Cc: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: Date format errors |
| Date: | 2003-04-26 18:18:08 |
| Message-ID: | 20030426181808.GA10048@wolff.to |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
On Wed, Apr 23, 2003 at 16:28:27 +0200,
Craig Elston <CElston(at)PICsolutions(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | nolan | 2003-04-26 18:58:59 | Re: Date format errors |
| Previous Message | Tom Lane | 2003-04-26 16:26:02 | Re: SELECT using RegEx inside a POSITION function |