Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-03-28 08:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found