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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -