Nov 30, 2001 #1 SgtP Technical User Nov 29, 2001 1 US I want to convert time format 01/01/01 to Jan. 1, 2001. Can any one help?
Dec 2, 2001 1 #2 crowe Technical User Jun 12, 2001 255 US call this script whatever you want (dateconv) and then pass the 12/02/01 date to it. # dateconv 12/02/01 Here ie the script: FIRST=`echo $1 | cut -d "/" -f 1` SECOND=`echo $1 | cut -d "/" -f 2` THIRD=`echo $1 | cut -d "/" -f 3` THIRDCHECK=`echo $1 | cut -d "/" -f 3 | cut -c 1` case $FIRST in 01) FIRST="Jan" ;; 02) FIRST="Feb" ;; 03) FIRST="Mar" ;; 04) FIRST="Apr" ;; 05) FIRST="May" ;; 06) FIRST="Jun" ;; 07) FIRST="Jul" ;; 08) FIRST="Aug" ;; 09) FIRST="Sep" ;; 10) FIRST="Oct" ;; 11) FIRST="Nov" ;; 12) FIRST="Dec" ;; esac case $SECOND in 01|02|03|04|05|06|07|08|09) SECOND=`echo $SECOND | cut -c 2` ;; esac case $THIRDCHECK in 0) THIRD="20$THIRD" ;; *) THIRD="19$THIRD" ;; esac echo "$FIRST $SECOND, $THIRD" crowe Upvote 0 Downvote
call this script whatever you want (dateconv) and then pass the 12/02/01 date to it. # dateconv 12/02/01 Here ie the script: FIRST=`echo $1 | cut -d "/" -f 1` SECOND=`echo $1 | cut -d "/" -f 2` THIRD=`echo $1 | cut -d "/" -f 3` THIRDCHECK=`echo $1 | cut -d "/" -f 3 | cut -c 1` case $FIRST in 01) FIRST="Jan" ;; 02) FIRST="Feb" ;; 03) FIRST="Mar" ;; 04) FIRST="Apr" ;; 05) FIRST="May" ;; 06) FIRST="Jun" ;; 07) FIRST="Jul" ;; 08) FIRST="Aug" ;; 09) FIRST="Sep" ;; 10) FIRST="Oct" ;; 11) FIRST="Nov" ;; 12) FIRST="Dec" ;; esac case $SECOND in 01|02|03|04|05|06|07|08|09) SECOND=`echo $SECOND | cut -c 2` ;; esac case $THIRDCHECK in 0) THIRD="20$THIRD" ;; *) THIRD="19$THIRD" ;; esac echo "$FIRST $SECOND, $THIRD" crowe