Does anyone know how to get the time portion using dbi's fetchrow_array to access a timestamp's time value? The command is:
$hub_sql_cmd = "select DISTINCT $hub_stuff[$c][1] from $hub_stuff[$c][0]" ; $temp = $hub_sql_cmd . " where $hub_stuff[$c][1] = '$line2[$ +c]'"; $hub_sth = $hub_dbh->prepare($temp) or die "Couldn\'t prepare statement: " . $hub_dbh->errstr; $hub_sth ->execute || die "Couldn\'t execute statement"; @line = $hub_sth->fetchrow_array;
which results in the sql command:
select DISTINCT AUDCTIME from mpi_audhead where AUDRECNO = 2.
AUDCTIME is a time stamp with a format of <date> <time> What the program NEEDs to get is the <time> value. When the perl code runs i get the <date> and that is all. The <time> is NOT brought into the array "@line".

Any meaningful suggestions?

You may send a reply to thelma1944@gmail.com

Thank you so very much!

-thelma

In reply to dbi fetchrow_array to access a timestamp by thelma1944

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.