in reply to How to search database by date range

FWIW, just because you're using Catalyst, there's no law that compels you to use DBIx::Class too.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
  • Comment on Re: How to search database by date range

Replies are listed 'Best First'.
Re^2: How to search database by date range
by kingmx (Initiate) on May 11, 2013 at 06:23 UTC

    Wow, thank you guys for the replies.

    I solved the problem with this code.

    my $rs = [$c->model('DB::table')->search( { 'me.date' => { "<=" => "2013-05-04", ">=" => "2013-05-03" } } ,{} )];

    To ww:
    sorry if I didn't put the actual codes. The reason is, I just want to limit my question to what I really needed.

    To thundergnat:
    Thanks for the link! I find it very informative. I will also try your suggestion.