android - UnParseable date exception at offset 0 java -


i working on android application in trying format date according 2/1/16 5:20 date. getting java.text.parseexception: unparseable date: "2/1/16 5:20 am" (at offset 1). code given below, please me out here.

dateformat fafterutc = new simpledateformat("mm dd yy hh:mm aa"); date dselectedafterutc = fafterutc.parse("2/1/16 5:20 am"); 

your simpledateformat missing /`s:

new simpledateformat("mm/dd/yy hh:mm aa") 

Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -