![]() |
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 |
| How can i calculate a Quarter of a Month | pidu_rak | UNIX for Advanced & Expert Users | 2 | 12-26-2007 12:47 PM |
| calculate 13 months ago | andrea_mussap | Shell Programming and Scripting | 4 | 11-21-2007 08:14 PM |
| calculate 13 months ago | andrea_mussap | Shell Programming and Scripting | 3 | 11-16-2007 03:18 PM |
| Subtract 2 months from the date | mahekr2000 | UNIX for Advanced & Expert Users | 5 | 07-23-2006 12:01 PM |
| Subtracting Two months from date | jwatson12 | UNIX for Dummies Questions & Answers | 3 | 09-13-2002 01:06 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Cron to run first day of month to calculate date 3 months ago
Hi,
I would like to find out how can i calculate a date which is 3 months ago. I intend to run a cron job on the 1st of every month, and calculate the month 4 months earlier from the date. For example, if today's date is 1st May 2007, i would like to return 012007( January 2007). i can get today's date by Code:
'date +%Y%m%d` |
|
||||
|
sorry, found many similar threads in the forum.
because i am using GNU date, i can get it by Code:
date -d " x months ago" |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|