I dont want to match that value but the value which i am printing on console is:: Wed Jul 16 18:31:04 GMT+05:30 2008 ,, so the format i need is MM/dd/yyyy ... so where i am confused is , i dont want to show the date in this fashion ( Wed Jul 16 18:31:04 GMT+05:30 2008).... I want the date to be displayed in in this fashion 7/16/2008...
You have a String as an input, and a String as an output. Between the two you need to get to date.
So as Jeanne suggests, first try to parse a small portion of the incoming String, then display that part in the output.
For example, you have the String:
"Wed Jul 16"
Can you parse just the Day of Week, Month, and Day of Month out of that into a new Date, then display the new Date in MM/dd format?
Then add the time. Then add the time zone. Then add the year.
[ August 10, 2008: Message edited by: Steve Luke ]