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.
我需要有关在 Android 中格式化日期的帮助。我已经学会了如何实现这样的日期,yyyy-MM-dd但现在我想要这样Dec 31, 1969。如何在 Java 中实现这个 dateFormat?
yyyy-MM-dd
Dec 31, 1969
SimpleDateFormat sdf = new SimpleDateFormat("MMM d, yyyy"); System.out.println(sdf.format(new Date()));
它将以您请求的格式返回日期!
你在寻找这样的东西吗?
http://developer.android.com/reference/java/text/DateFormat.html