Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { /** * Get First Date of month */ public static Date getFirstDateOfMonth(int month, int year) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month, 1); calendar.set(Calendar.DATE, calendar.getActualMinimum(Calendar.DATE)); return calendar.getTime(); } }