Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
<date-time>2008-07-13T18:00:00</date-time>
也许你正在寻找这样的东西:
String pattern = "'<date-time>'yyyy-MM-dd'T'HH:mm:ss'</date-time>'"; SimpleDateFormat format = new SimpleDateFormat(pattern); Date date = format.parse("<date-time>2008-07-13T18:00:00</date-time>");