![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| changing the format of date in unix | trichyselva | UNIX for Dummies Questions & Answers | 5 | 03-20-2008 10:07 AM |
| convert mmddyy date format to ccyyddd format?? | Bhups | Shell Programming and Scripting | 2 | 09-27-2006 08:30 PM |
| changing the format of date | nasirgondal | Post Here to Contact Site Administrators and Moderators | 1 | 06-07-2006 10:37 PM |
| Changing the format of date | nhatch | UNIX for Dummies Questions & Answers | 4 | 04-11-2006 07:17 AM |
| Changing date format | Sabari Nath S | Shell Programming and Scripting | 5 | 12-07-2005 12:38 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
||||
|
||||
|
Try using:
FECHA=`date '+%m_%d_%C%y'` echo "$FECHA" This might work. Lestat |
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
Quote:
But i still get the same out put with 0's for month and day present for example 06_08_2005 (instead of 6_8_2005) Nina |
|
#10
|
||||
|
||||
|
FECHA=`date '+%m_%d_%C%y' | sed 's/^0//;s/_0//'`
|
|
#11
|
|||
|
|||
|
Quote:
I just needed to add a '_' (FECHA=`date '+%m_%d_%C%y' | sed 's/^0//;s/_0/_/'`) to make it exactly as the format i needed it to be |
|||
| Google The UNIX and Linux Forums |