Home » Infrastructure » Unix » Date function
Date function [message #305198] Mon, 10 March 2008 02:08 Go to next message
user71408
Messages: 585
Registered: November 2007
Location: NE
Senior Member

Hi all,
I wrote a scripts as follows
#!/bin/ksh

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
monthname="${months[month]}"
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: 64103
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.

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


Current Time: Sat Dec 03 14:23:43 CST 2016

Total time taken to generate the page: 0.08725 seconds