Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Searching a Date between 2 dates with DBIx::Class

by phildeman (Scribe)
on Sep 06, 2019 at 01:51 UTC ( [id://11105693]=note: print w/replies, xml ) Need Help??


in reply to Searching a Date between 2 dates with DBIx::Class

Nevermind, I figured it out. I placed the <= and >= in the wrong places. And need to format the current date ($dt) It should have been:

my $mydatarow = $schema->resultset( 'DataTable' )->search({ START_DATE + => { '<=' => $dt }, END_DATE => { '>=' => $dt->ymd() }})->single +;

Thanks anyway!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11105693]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-03-29 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found