Android - most progressing mobile OS

Monday, 21 September 2015

Convert Seconds into Second/Minute/Hour

            long s = seconds % 60;
   long m = (seconds / 60) % 60;
   long h = (seconds / (60 * 60)) % 24;
   return String.format("%d:%02d:%02d", h,m,s);
Posted by Er,,,RAJESH...Nasit at 10:52
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2016 (2)
    • ►  June (1)
    • ►  March (1)
  • ▼  2015 (12)
    • ►  December (2)
    • ▼  September (10)
      • Listview adapter
      • Cardview example
      • Convert Seconds into Second/Minute/Hour
      • Check internet's connection ON/OFF event
      • NotificationPanel with Button
      • Rest Client to call webservice
      • Web Service response object's class
      • PreferenceSetting in Android
      • Basic DataBase for Android
      • Basic functions of android Service @Override ...
  • ►  2013 (4)
    • ►  March (3)
    • ►  February (1)
  • ►  2012 (1)
    • ►  May (1)

About Me

Er,,,RAJESH...Nasit
View my complete profile
Simple theme. Theme images by luoman. Powered by Blogger.