Thank you
Try SimpleDateFormat with your own format string.
hth
--
Owen
Date time = new Date(s);
I might have thought too much at the beginning...
> For the format specified, Date class will do the job:
>
> Date time = new Date(s);
Note that the Date(String) constructor is deprecated and may be removed
in a future version of Java.
The recommended way to do this is with the DateFormat parse() method.
Just use a DateFormat that matches your input string.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
That would be a problem. But I just stuck at the DateFormat parse() method.
It did not give me a chance to define my input time format, nor did it parse
correctly.
Looking at Java API, it seems that SimpleDateFormat has a better chance to
make
it work although I have not tried it.
SimpleDateFormat sdfInput = new SimpleDateFormat
("EEE MMM dd HH:mm:ss zzz yyyy", Locale.CANADA );
time = sdfInput.parse(s);