Pregunta

No sé cómo mostrar la hora en formato AM / PM en blackberry usando blackberry datefield. Por favor, dame una idea de cómo hacerlo.

¿Fue útil?

Solución

Use SimpleDateFormat :

SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss aa");
long date = System.currentTimeMillis();
DateField dateField = new DateField("time:", date, timeFormat);
add(dateField);

texto alternativo http://img171.imageshack.us/img171/7642/timeformat .jpg

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top