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 - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -