Come mostrare DateField con il formato AM / PM in Blackberry?
-
22-07-2019 - |
Domanda
Non so come mostrare l'ora in formato AM / PM in blackberry usando la data di blackberry.Pls mi dà un'idea di come farlo.
Soluzione
Usa SimpleDateFormat :
SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss aa");
long date = System.currentTimeMillis();
DateField dateField = new DateField("time:", date, timeFormat);
add(dateField);
alt text http://img171.imageshack.us/img171/7642/timeformat .jpg
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow