0

我不知道如何使用黑莓日期字段在黑莓中以 AM/PM 格式显示时间。请告诉我如何执行此操作。

4

1 回答 1

1

使用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

于 2009-10-30T10:27:04.197 回答