Обсуждение: Formatting date question

Поиск
Список
Период
Сортировка

Formatting date question

От
"Linn Kubler"
Дата:
Hi,

I'm using a database program to query my postgres backend and I'm
trying to convert a timestamp to a date for display purposes.  In psql I
can use to_char() and it works fine but that command doesn't work in my
database applications sql select statement, just gives a syntax error.
Of course if I try using the similar command from the database
application the query fails.  I'm using Visual Fox Pro via odbc, they
call it sql passthru.

Any suggestions?

Thanks in advance,
Linn


Re: Formatting date question

От
"Nigel J. Andrews"
Дата:
On Thu, 22 Aug 2002, Linn Kubler wrote:

> Hi,
>
> I'm using a database program to query my postgres backend and I'm
> trying to convert a timestamp to a date for display purposes.  In psql I
> can use to_char() and it works fine but that command doesn't work in my
> database applications sql select statement, just gives a syntax error.
> Of course if I try using the similar command from the database
> application the query fails.  I'm using Visual Fox Pro via odbc, they
> call it sql passthru.
>
> Any suggestions?

I know nothing of the odbc interface but seeing as this turned up as I was
posting another message...

Perhaps you need to escape quotation marks when supplying the query string in
Foxpro and/or odbc.


--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants