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.
我不知道如何使用黑莓日期字段在黑莓中以 AM/PM 格式显示时间。请告诉我如何执行此操作。
使用SimpleDateFormat:
SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss aa"); long date = System.currentTimeMillis(); DateField dateField = new DateField("time:", date, timeFormat); add(dateField);
替代文字 http://img171.imageshack.us/img171/7642/timeformat.jpg