Hello,
I am wondering if anyone has a script that can do the following: (in a Unix environment)
> Check what month and year it is currently (For eg. Current Month = May)
> Retrieve Last month's beginning and end dates (eg. 04/01/06 and 04/31/06)
I want these values to be passed into another file that will consist of only these values.
Eg. I will have a properties file such as...
Beg Date 04/01/06
End Date 04/31/06
The reason I need to do this is I have a customized program that queries the database for entries within a certain time period. Since we want to automate this program, we will not be feeding the dates manually each month...therefore, we are going to setup a cron job to automatically run this program with appropriate dates to be queried into the database.
If anyone has other ideas on how to approach this, please advise.
Thank you for your time.
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.