Date Conversion on output string from awk

Hi,

I would like to convert the output from awk function to date and print on the screen.

Example : echo "Start Date: May 24 2010" | gawk -F": " '{print $2}'
Output : May 04 2010

I want this to be converted to 2010/05/24

Can i use date function here and how?

Thanks,
Deepika

If you don't have to worry about portability, and the date command installed on your system supports the -d option, this will work:

date -d "May 24 2010"  "+%Y/%m/%d"

You can incorporate that with your awk programme to convert your string. I'm not a POSIX expert, but I am fairly certain that this is notstandard at all, so go with caution if you decide on this route.

:b: Thanks