java - DateTimeFormatter parser -


i have parse following date: 2015-05-04 00:00:00.0 formatter can't recognize it.

datetimeformatter formatter = datetimeformatter.ofpattern("yyyy-mm-dd hh:mm:ss.s").withlocale(locale.us); 

i know last character problem, don't know put there.

the pattern you're looking is: "yyyy-mm-dd hh:mm:ss.s", key difference being symbol used minutes (you told parse them months). javadoc of datetimeformat:

m/l     month-of-year               number/text       7; 07; jul; july; j m       minute-of-hour              number            30 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -