Subject Re: [IBO] Sorry for the "off topic" question but
Author Geoff Worboys
> (this is not an IBO Question, but... maybe some of you can
> help me in this IB question)

You will probably get better results by posting such queries to
IB_Support.


> Question:
>
> Is there any way to get the values from day/month/year of a Date
> field in a trigger.
>
> I need something like:
>
> MyYear = YEAR( new.MyDateField)

If you are using IB6 there is an extract function. Documentation for
this can be found in the IB6 release notes (from the beta
documentation) see: http://www.interbase2000.org/doc_user.htm


If you are using versions prior to IB6 you can either...

Use UDFs see http://www.cvalde.com/misc/packages_and_utilities.htm

or some people use small stored procedures that achieve this by
various manipulations. see
http://www.interbase.dthomas.co.uk/ibstoredproc.htm


HTH

Geoff Worboys
Telesis Computing