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.

È stato utile?

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
scroll top