Here you can find the source of getMinute(long dateTimeMillis)
public static int getMinute(long dateTimeMillis)
//package com.java2s; //License from project: Open Source License 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 w ww.j ava 2s .c o m }