Article View: pl.comp.lang.java
Article #153707Konwersja String do Date
From: Janek.M
Date: Tue, 11 Dec 2012 15:40
Date: Tue, 11 Dec 2012 15:40
11 lines
1144 bytes
1144 bytes
Mam string w postaci:
String strDate = "Fri Dec 03 00:00:00 CET 2012";
jakiego formatu użyć aby go przekonwertować do obiektu Date?
próbuję:
DateFormat dateFrm = new SimpleDateFormat("EEE MMM d HH:mm:ss z yyyy");
ale dostaję wyjątek.
Technical Details
Message-ID:
<6cf6293c-f3dc-4fa7-8bd8-2f5323d18f3e@googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.cyf-kr.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!news.glorb.com!kr7no10763032pbb.0!news-out.google.com!s9ni38583pbb.0!nntp.google.com!kt20no11864898pbb.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.cyf-kr.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!news.glorb.com!kr7no10763032pbb.0!news-out.google.com!s9ni38583pbb.0!nntp.google.com!kt20no11864898pbb.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: pl.comp.lang.java Date: Tue, 11 Dec 2012 07:40:03 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.124.7.2; posting-account=z0TMvAoAAAAsjJF2yXFMWiiMScn0WP3I NNTP-Posting-Host: 94.124.7.2 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6cf6293c-f3dc-4fa7-8bd8-2f5323d18f3e@googlegroups.com> Subject: Konwersja String do Date From: "Janek.M" <grupynews@gmail.com> Injection-Date: Tue, 11 Dec 2012 15:40:03 +0000 Lines: 11 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit