Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
change date format using shell
Name: vmtrt Date: February 25, 2005 at 14:45:03 Pacific OS: HP-UX CPU/Ram: 256 ram
Comment:
Hi all, I am trying to change the date format from MM/DD/YYYY to MMDDYYYY in the fixed width file using shell. dates are in fields 19-28 and 29-38.
Name: gurubit Date: March 2, 2005 at 04:32:43 Pacific
Reply:
I guess you want to format the date in your required format using the shell script. You need to use date '+%m' - Month date '+%d' - Day Parse the date '+%c' and get the year. you can use the 'cut' command and get the reqd. field.
Summary: Hi friends, I am executing a SQL through UNIX. I receive a date from SQL and store it in a variable in unix. The date is in (13-AUG-2009) format. But i need this to be in YYYYMMDD(20090813). Kindly...
Summary: I think to do this properly you have to convert to a julian date format, do the arithmetic, and convert back. I had to write something similar recently and I started out trying to do it the easy way a...
Summary: Hi all, I'm using ksh, and have a problem over date formatting and getting the difference between them. First of all, I need to remove some information to get the time from it. A timestamp from my lo...