![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
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 |
| last month end date | vanathi | UNIX for Advanced & Expert Users | 7 | 03-21-2008 04:17 PM |
| How do I set my date in a unix script to 'new month | Agent704 | UNIX for Dummies Questions & Answers | 1 | 01-27-2008 01:58 PM |
| Use date command to find last month | Cbish68 | Shell Programming and Scripting | 5 | 08-10-2007 10:32 AM |
| how to get month last date in unix | rajan_ka1 | Shell Programming and Scripting | 12 | 10-04-2005 07:20 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
The format of the date is like
Tue Jul 3 06:40:54 EDT 2007 i want to do some manipulation with day, month, year This is what i am using to process few things new_day=`date` month=`echo $new_day | cut -f2 -d ' '` year=`echo $new_day | cut -f6 -d' '` now i want to know the which month falls in for the $new_day (1 to 12) so $new_day is Tue Jul 3 06:40:54 EDT 2007 so how do i find out the month is 07 |
|
||||
|
>> date -d "Tue Jul 3 06:40:54 EDT 2007" +%m
works perfectly fine I am using Linux Thanks |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|