As of SQL::Abstract 1.60, the following code now properly supports using functions with between.

my $rs = $schema->resultset('User_Read_Log')->search(
    {
       datetime => {
       "between",
       [
           \[ "to_date(?, 'YYYYMMDD HH24:MI:SS')", "$start 00:00:00" ],
           \[ "to_date(?, 'YYYYMMDD HH24:MI:SS')", "$end 00:00:00" ]
       ]
   }

Thanks so much Peter and Will and everyone who responded. I'll see about propagating this example to the cookbook.
Karen

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to