java - Converting date.toString() to date -


i'm trying convert string date. i've got example here input string hardcoded string.

try {     string currentdate = "tue jan 05 21:19:57 cet 2016";     date d = new simpledateformat("eee mmm dd hh:mm:ss zzz yyyy", locale.us).parse(currentdate); } catch (parseexception e) {     e.printstacktrace(); } 

for reason, throws following exception:

parseexception: unparseable date: "tue jan 05 21:19:57 cet 2016" (at offset 20) 

could me problem? thanks!

your problem described java.text.parseexception: unparseable date

your machine local can effect local used in simpledateformat


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -