Hi there! Im triying to execute the next query using perl:
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'));
But i dont know how i can use this time module:
use POSIX 'strftime'; $now = lc strftime("%d/%m/%y %H:%M:%S", localtime);
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!!!:::

In reply to Question about perl & oracle & and a SQL query by Sombrerero_loco

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.