Here you can find the source of getMinute(long dateTimeMillis)
public static int getMinute(long dateTimeMillis)
//package com.java2s; import java.text.SimpleDateFormat; public class Main { public static int getMinute(long dateTimeMillis) { SimpleDateFormat format = new SimpleDateFormat("mm"); StringBuilder dateString = new StringBuilder( format.format(dateTimeMillis)); return Integer.parseInt(dateString.toString()); }//from www.j ava 2 s . c o m }