Howdy,

I have run into a little problem and I could really use some wisdom to help figure this out. I have a script that uses ADO to execute a stored procedure. It returns a result set that I piece apart and stick into a hash. I have noticed that a date field comes back in a different formats based on the operating system that I run the application. On Win2k it comes back as "mm/dd/yyyy HH:MM:SS" and on NT it comes back as "yy/mm/dd HH:MM:SS". This causes some issues because I need to interrogate the date to perform some calculations to see if an entry in the table has expired. Does anyone have any idea how I can force the date to be in a certain format? I would much rather have Perl or the operating system figure this out so I can port this without having to change code.

Thanks,
Tom


In reply to ADO and date formats. by TAC

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.