| From: | Volkan YAZICI <yazicivo(at)ttmail(dot)com> |
|---|---|
| To: | Gavin 'Beau' Baumanis <gavinb(at)eclinic(dot)com(dot)au> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: dateformat issue |
| Date: | 2008-04-10 12:37:13 |
| Message-ID: | 8763up7uo6.fsf@alamut.mobiliz.com.tr |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Hi,
Gavin 'Beau' Baumanis <gavinb(at)eclinic(dot)com(dot)au> writes:
> I have a question about dates, please.
>
> I am using Coldfusion and Postgres
> I have a function that takes the ate entered in a form and converts it
> into an odbc date format.
>
> So the string ends up being;
> {d '2008-04-10'}
>
> Strangely, the function is used throughout the application and causes
> no issues but on one particular template.
> And this same templates is replicated for other clients - that
> seemingly have no issue .
>
>
> The SQL is simply
>
> Insert into table (datefield) values ({d '2008-04-10'})
>
> Now, I have read the docs and do not see the {d '2008-04-10'} format
> as being a valid date data type...
> But it works elsewhere in the application / on other sites - thus my
> current state of confusion.
>
> Thanks in advance for any ideas you might have.
As others have underlined, "{d '2008-04-10'}" is not a valid SQL
timestamp format. I think your query adapter somehow converts it to its
appropriate format on the fly. If I were you, to spot the problem, I'd
turn query logging on in the server side and see
- How does working date queries get passed to the server?
- How does bogus query get passed to the server?
This details can help you/us to identify the problem.
Regards.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2008-04-10 13:16:02 | Re: [SQL] pl/PgSQL, variable names in NEW |
| Previous Message | Martin Edlman | 2008-04-10 11:34:06 | Re: pl/PgSQL, variable names in NEW |