Subject Re: [firebird-support] Select year from datestamp-var
Author Helen Borrie
At 02:10 PM 8/12/2004 +0100, you wrote:


>Hi all,
>
>a very a simple question.
>
>I tried to select a year from a timestamp-field with:
>Select Extract(YEAR FROM timestampvar) From Table
>but it will not work when I try it from Delphi, it doesn't seems to know
>extract. I'm using firebird 1.5. What can be the reason?

Although it is legal SQL, Delphi needs a fieldname in its dataset
object. Try:

Select Extract(YEAR FROM timestampvar) as tsYear
From Table

If that doesn't fix the problem, provide more details about your
environment and tools. You might, for example, be using an old driver that
doesn't know about EXTRACT(); or perhaps an IB 5.x database.

./heLen