java - parse ArrayList to Date -
this question has answer here:
- ways iterate on list in java? 9 answers
i have array list string , convert in date. seems 'parse' cannot used this, within following piece of code:
list<string> eventslist = arrays.aslist("2015-06-02 00:15", "2015-06-02 22:15", "2015-06-03 00:18"); list<date> eventsdate = new simpledateformat("y-m-d h:m").parse(eventslist);
but doesn't work.
could me please?
there's no parse
method list<string>
parameter why code won't compile.
there's parse
accepts string
. can use loop or stream result need.
further reading on available methods of simpledateformat
can done here.
Comments
Post a Comment