Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Integer GetDayOfMonth(Date d) { Calendar cal = Calendar.getInstance(); cal.setTime(d); return cal.get(Calendar.DAY_OF_MONTH); } }