Hi,

I have a small method that returns a string with the time of a date. This 
works fine when I show the start and end time, but the difference appears 
wrong. Example: Start Time = 8:26:11, End Time = 8:26:13 and Difference =* 
7*: 0: 1.

My method is:

    private String horaTexto(Long fecha) {
        java.util.Calendar c = java.util.Calendar.getInstance();
        Date d = new Date(fecha);
        c.setTime(d);
        return c.get(java.util.Calendar.HOUR) + ":" + 
c.get(java.util.Calendar.MINUTE) + ":" + c.get(java.util.Calendar.SECOND);
    }

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/e053123a-30d2-45fb-98bf-55aaacfd476bo%40googlegroups.com.

Reply via email to