![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | 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 09: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 the date format | Dream86 | Shell Programming and Scripting | 10 | 06-08-2005 10:35 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Changing date format
Hi,
Is there any way to change one date format to another ?? I mean I have a file having dates in the format (Thu Sep 29 2005) ... and i wud like to change these to YYYYMMDD format .. is there any command which does so ?? Or anything like enum which we have in C ?? Thanks in advance, Sabari Nath S |
| Forum Sponsor | ||
|
|
|
|||
|
Hi Vino ...
this is the version of the OS I am using .. $ version Machine hardware: sun4u OS version: 5.9 Processor type: sparc Hardware: SUNW,Sun-Fire And its not accepting -d option for date command ... $ date -d "Thu Sep 29 2005" +%Y%m%d date: illegal option -- d usage: date [-u] mmddHHMM[[cc]yy][.SS] date [-u] [+format] date -a [-]sss[.fff] |
|
|||
|
Thanks Vino ... i modified that and it works fine for me .....
Now I am getting a list of dates as result from some long command and i am piping that to xargs -l1 sabri.ksh ; and getting the conversion done ... thx a lot ... but still let me ask just out of curiosity tht do we have any thing like enum in unix or awk so that i can avoid using a ksh script and do that in command line itself ..... |