fixed in trunk... I am sure we will have 1.96.2 soon although this is
a pre-existing problem.

On Jun 1, 2:28 pm, Jose <jjac...@gmail.com> wrote:
> On 1 jun, 16:18, Massimo Di Pierro <massimo.dipie...@gmail.com> wrote:
>
> > Can you try replace:
>
> > return "DATEPART('%s' FROM %s)" % (what, self.expand(field))
>
> > with
>
> > return "DATEPART(%s, %s)" % (what, self.expand(field))
>
> I tried from the console, this work fine. SQL:
>
> select * FROM my_table WHERE DATEPART(year,
> my_table.my_datetime_field) = 2011;
>
> so your suggestion [1] should work.
>
> Jose
>
> [1] return "DATEPART(%s, %s)" % (what, self.expand(field))

Reply via email to