You don't say what database you're using, but if its Oracle, then the default datetime format is often 'DD-MON-YYYY'. I usually execute these statements after every connect:
$dbh->do(q(ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:S
+S');
$dbh->do(q(ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24
+:MI:SSxFF');
$dbh->do(q(ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD H
+H24:MI:SSxFF');
That would get you the date and time. If you just want the time, select some function of the datetime that just extracts the time, or do a simple s/.*\s// or something on the datetime returned.
Also, please wrap your code in <code></code> tags. And think about using placeholders and bind values in your SQL instead of injecting variables into your SQL. And no, I'm not going to email you.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.