2014-04-14 22:53 GMT+02:00 Iasmini - Gmail <[email protected]>:
> Hi,
>
> How do I filter between 2 dates in a wizard?
>
> For greater then this works fine:
>
> if self.start.opening_date_start:
> parameters.append(('create_date', '>=',
> DateTime(self.start.opening_date_start.year,
> self.start.opening_date_start.month,
> self.start.opening_date_start.day,
> hour=0, minute=0, second=0, microsecond=0))),
>
> I tried this, but it says too many values to unpacking:
>
> if self.start.opening_date_start:
> parameters.append(('create_date', '>=',
> DateTime(self.start.opening_date_start.year,
> self.start.opening_date_start.month,
> self.start.opening_date_start.day,
> hour=0, minute=0, second=0, microsecond=0),
>
Be careful with the tuples. Here must end one, and start another.
> 'create_date', '<=',
> DateTime(self.start.opening_date_end.year,
> self.start.opening_date_end.month,
> self.start.opening_date_end.day,
> hour=0, minute=0, second=0, microsecond=0))),
> --
>
> Iasmini Gomes
> Sílex Sistemas
> www.silexsistemas.com.br
>
> ---
> Este email está limpo de vírus e malwares porque a proteção do avast!
> Antivírus está ativa.
> http://www.avast.com
>
>
--
Jesús Martín
Zikzakmedia SL
Dr. Fleming, 28, baixos
08720 Vilafranca del Penedès
☏ 93 890 21 08