extract(week from 'Now') error

Viewed 1222

I'm running an firebird 2.5 superclassic on my raspberrypi. I execute the following query and it gives the following error:

SELECT foodmanager1.F_US_FIRSTNAME,foodmanager1.F_US_LASTNAME, 
foodmanager1.F_US_PICTURE_URL,
foodmanager2.F_US_FIRSTNAME, foodmanager2.F_US_LASTNAME, 
foodmanager2.F_US_PICTURE_URL,
duty.F_US_FIRSTNAME, duty.F_US_LASTNAME,
duty.F_US_PICTURE_URL,
a.F_FD_DATE from
    T_FOOD_DUTY a
inner join T_USER foodmanager1 on a.F_US_ID1 = foodmanager1.F_US_ID
inner join T_USER foodmanager2 on a.F_US_ID2 = foodmanager2.F_US_ID
inner join T_USER duty on a.F_US_ID3 = duty.F_US_ID
where extract(week from a.F_FD_DATE) = extract(week from 'Now')

With this error:

Specified EXTRACT part does not exist in input datatype

SQL error code=~105.

I know the problem is with the extract(week from 'Now'), because when I manually replace it with a number I do get some results.

Any idea what the problem is, or do you have an alternative?

2 Answers
Related