Input Date to mm/dd/yy

Hi, I am new to unix and I am doing following steps :

  1. Ask user to enter date in mm-dd-yyyy format.
  2. show the date user entered from step #1 .
  3. convert user enter date into YYYY/MM/DD format.

Here is the script I am using

 
echo "Please enter the date in mm-dd-yyyy format: "
read X
#export date=$X
echo "Date you entered is $X"
a=$X+"%y/%m/%d"
echo $a

The problem here the date does not covert to YYY/MM/DD , can somebody please help me. Thanks

This is an almost identical question to the recently-asked thread here:

Date Parsing

1 Like