But i dont know how i can use this time module:my $sql1_datos = qq(select contador, cod_entidad_oim, cod_agr, cod_ope +racion from mapcom_portext.TR0685002 where fch_hor_operacion between + to_date(\'$now\','dd-mon-yyyy') and to_date(\'$1hourago\','dd-mon-yy +yy'));
I need to do always a query where $now its equal to the current time in format DD/MM/YYYY HH24:MM:SS... and $1hourago must be $now - 1 hour.... This its where i dont know how i can tell perl to from the (for example) $now = 09/01/2009 15:00:00 rest 1 hour and use its as $1hourago.... Any ideas? maybe transforming it to time var, resting 3600 seconds and convert it again to the desiree format? Thanks! :::When you dream, there're no rules, ppl can fly...anything can happen!!!:::use POSIX 'strftime'; $now = lc strftime("%d/%m/%y %H:%M:%S", localtime);
In reply to Question about perl & oracle & and a SQL query by Sombrerero_loco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |