in

Unix Korn Shell - Converting Strings to Dates

I am pulling the Day,  Month , Year from various files using 'ls -l' to allow me to compare files in one directory against another.  The month is coming out as 'Oct'.  The problem is I need to convert my final string e.g. '10/May/2005' to a date format to allow me to filter which has the latest date etc.  I have trawled various sites with no answers.

I have used awk to extract the positions from ls-l process.   Any help appreciated....
Movie Stars

Solution: Unix Korn Shell - Converting Strings to Dates

echo '10/May/2005' | awk -F/ 'BEGIN{m["Jan"]=1;;m["Mar"]=3;m["Apr"]=4;m["May"]=5;m["Jun"]=6;m["Jul"]=7;m["Aug"]=8;m["Sep"]=9;m["Oct"]=10;m["Nov"]=11;m["Dec"]=12}{printf "%4d-%02d-%-2d",$3,m[$2],$1}'