Hellow Everyone,
I need help with a small problem. I have a perl script which created a table of data for the engineers here. Yesterday, my boss came to me and wanted certian parts ot the table to be links to other scripts within the system. Well, that was no problem, but a new bug presented itself today. Basically, the script in question has parameters as follows,  http://www-mat.nextel.com/cgi-bin/stats-cgi/perlsort?date=30Nov00&metric=2&report_type=Busy+Hour&datatype=Philly&market=PHL. Now, that prints a table, with about 30 colums and 1200 rows, and the last row, there is a link to another script, which looks like this http://www-mat.nextel.com/cgi-bin/stats-cgi/halfhr.cgi?date=31Nov00&netid=0013-1&market=PHL.

Now, the problem isnt creating the links, it has to do with the date paramter in the link. See what happens is, in the second file, the data has to be one day after the date that you would want the data to be called for. So if i want the data for the 30th of november, i would need to put the 1st of december in the script. So here was mty solution, to take the first 2 characters of the date, add one, and then put the date backtogether.. that works for everyday.. except the last day of any given month, (ie: today). My question is.. is there a way to logically take the date in the script ( it would be in the format of 30Nov00 and make it 01Dec00 chronogically instead of the way i am doing it now? Here is the way i do it currently. <code> $date2 = $date; if ($date ne "today"){ $newdate = substr($date2, 0, 2); $enddate = substr($date2, 2, 5); $newdate++; $date2 = $newdate.$enddate; }
Well, thank you very much once again in advance


Dipul

In reply to Time Issues by ImpalaSS

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.