phildeman has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to query data where a column falls between two dates.
my @events = $schema->resultset( 'MyTable' )->search({ eventdate => { '>=' => $date1 }, eventdate => { '=<' => $date2 } });
I have also tried doing
my @events = $schema->resultset( 'MyTable' )->search({ eventdate => {between => [$date1,$date2]}});
Each time it fails. It gives me the following error:
expected 'returns', found 'date_range' at /my_app_path/my_app/lib/perl5/MooseX/Method/Signatures.pm line 191.
Do you know a way to query by date range with DBIx::Class?
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Querying Date Ranges with DBIx::Class
by tangent (Parson) on Sep 09, 2014 at 02:33 UTC | |
by phildeman (Scribe) on Sep 09, 2014 at 12:41 UTC |