Date conversion help from dd/mm/yyyy to dd/Mon/yyyy i.e. 28/10/2012 to 28/Oct/2012

Hi I have a problem with Date format in my code.

1st I am trying to convert today's date to yesterday's using

YESTERDAY3=`perl -e '@y=localtime(time()-86400); printf "%04d/%02d/%02d",$y[5]+1900,$y[4]+1,$y[3];$y[3];'`

And once it is done I am trying to using the yesterday date in a grep command to compare a logfile. But, the date format in logfile is 28/Oct/2012.

Could you please help me convert 28/10/2012 to 28/Oct/2012.

Thank You!

---------- Post updated at 09:01 PM ---------- Previous update was at 09:00 PM ----------

It works:b:...Thank you!:slight_smile:

Or use dateutils, e.g.

dconv yesterday -f '%Y/%b/%d'