Formatting date question

Started by Linn Kublerover 23 years ago2 messagesgeneral
Jump to latest
#1Linn Kubler
LKubler@ecw.org

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

#2Nigel J. Andrews
nandrews@investsystems.co.uk
In reply to: Linn Kubler (#1)
Re: Formatting date question

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