Home » Infrastructure » Unix » Date function
Date function [message #305198] Mon, 10 March 2008 02:08 Go to next message
Messages: 585
Registered: November 2007
Location: NE
Senior Member
Hi all,
I wrote a scripts as follows

year=`echo $1 cut -c 1-4`
month=`echo $1 | cut -c 5-6`
day=`echo $1 | cut -c 7-8`
set -A months \
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
echo "$monthname"_"$day"

Required O/P : if Jan 01-2008,Feb 02-2008

but i am getting using above script if Jan 00-2008
if feb 01-2008.
Please help me in thi sissue..

Thank you.
Re: Date function [message #305248 is a reply to message #305198] Mon, 10 March 2008 04:18 Go to previous message
Michel Cadot
Messages: 68597
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This OraFAQ a forum dedicated to Oracle questions and not other ones.
Post your questions in a Unix forum.

Previous Topic: how to setup bashprofile for multiple oracle homes
Next Topic: unable to change SID on 10g
Goto Forum:

Current Time: Sat Feb 24 11:01:20 CST 2024