SimpleDateFormat.format is used to convert java.util.Date object to a String
object. You used it in oposite direction by converting a String object to
Date object. That's the reason of exception happened.

On Tue, Dec 23, 2008 at 10:25 PM, arnaud <arnaud.ago...@atosorigin.com>wrote:

>
> That is the value of  updatedParameters[i][1]  Thu Dec 18 00:00:00 UTC
> +0100 2008.
>
> Fred Janon a écrit :
> > The format would have to be "MM/dd/yyyy" is you want month/day/year. MM
> is
> > the month, mm is the minutes. But that's not the answer to your question,
> > sorry.
> >
> > Fred
> >
> > On Tue, Dec 23, 2008 at 21:02, arnaud <arnaud.ago...@atosorigin.com>
> wrote:
> >
> > >
> > > Hello every one,
> > > i write this code to format a date
> > >
> > >  SimpleDateFormat   sdf = new SimpleDateFormat  ("mm/dd/yyyy");
> > >                                   String date =
> > > sdf.format(updatedParameters
> > > [i][1]);
> > >
> paramValue.setDateField(sdf.parse(date));
> > >
> > > where is a String and i have tis error:
> > >
> > > java.lang.IllegalArgumentException: Cannot format given Object as a
> > > Date
> > >
> > > What can i do please?
> > > Arnaud
> > > >
> > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to