Java tutorial
import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static void main(String[] args) { Date date = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("m"); System.out.println("minutes in m format : " + sdf.format(date)); } } //minutes in m format : 35