![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help, I need to get the last date of previous month | sirrtuan | Shell Programming and Scripting | 11 | 10-14-2008 05:59 AM |
| KSH Checking Previous Date** | developncode | UNIX for Dummies Questions & Answers | 4 | 04-17-2008 12:42 PM |
| Specify a previous date as start date in shell script | ritzwan0 | Shell Programming and Scripting | 2 | 09-25-2006 05:58 PM |
| Get the Previous date | Nayanajith | Shell Programming and Scripting | 2 | 06-29-2006 01:39 AM |
| How to find Previous date and Coming date | arunava_maity | UNIX for Dummies Questions & Answers | 2 | 05-24-2001 11:41 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Thanks Blowtorch.
As a unix command its working fine, I tried to put in my perl program and made the changes to assign the previous date(format mm/dd/yyyy) to a variable but its not working fine. Could you please look at once. thanks, raju |
|
|||||
|
The command I gave will give the output in the yyyy/mm/dd format. You will have to switch the mytime[x] around to get the output in the format that you want.
And another thing, are you using that snippet in a perl program? Then you can use this: Code:
@mytime=localtime (time - 86400); #from this point on, you can use $mytime[3] for day, $mytime[4] for month (zero based) and $mytime[5] for the year (add 1900) |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|