Subject | Re: [ib-support] how get the current year |
---|---|
Author | Helen Borrie |
Post date | 2001-12-12T12:35:44Z |
At 12:34 PM 12-12-01 +0000, you wrote:
SELECT EXTRACT(YEAR FROM CAST('TODAY' AS DATE)) FROM RDB$DATABASE INTO :MY_YAR
cheers,
Helen
>hi to allYes: in Dialect 3 you have to cast the date literals:
>I need get current year
>I do this:
>SELECT 'TODAY' FROM RDB$DATABASE INTO :MY_TODAY
>How can I use extract funtion to extract the year?
>I try
>SELECT EXTRACT(YEAR FROM 'TODAY') FROM RDB$DATABASE INTO :MY_YAR
>but i receive a error message "Specified EXTRACT part does not exist
>in input datatype"
>
>Are thre other way to do this?
SELECT EXTRACT(YEAR FROM CAST('TODAY' AS DATE)) FROM RDB$DATABASE INTO :MY_YAR
cheers,
Helen