in reply to NOW SQL portability

I cannot remember if this is a final version or not (I pulled it out of my gmail note bin) but I used this or something like it not too long ago. DBD::SQLite::Cookbook. Some simple stuff like this can work but I generally agree that chasing engine agnostic SQL is a losing proposition. :(

use Date::Calc; $dbh->func("NOW", 0, sub { sprintf('%d-%02d-%02d %02d:%02d:%02d', Date::Calc::Today_and_Now) }, "create_aggregate");

Replies are listed 'Best First'.
Re^2: NOW SQL portability
by SilasTheMonk (Chaplain) on Dec 22, 2009 at 20:08 UTC
    Thanks. That seems to point the way forward.