I need to format my time string such as this:
int time = 160;
Here\'s my sample code:
public static String formatDuration(
Another simple approach could be something along the lines:
public static String formatDuration(String minute){ int minutes = Integer.parseInt(minute); int hours = minutes / 60; minutes = minutes % 60; return hours + "hrs " + minutes + "mins."; }