changing the format of date

In my shell script i have a variable which stores date in the format of YYYYMMDD. Is there any way to format this value to MM/DD/YYYY.

Thanks.

This thread is duplicated. Moderators please close this thread. The original one at convert date format YYYYMMDD to MM/DD/YYYY