Android examples for java.util:Month
first Date Of Month
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date firstDateOfMonth(Date date) { try {/*from w ww . j a v a 2 s. co m*/ return (new SimpleDateFormat("yyyyMMdd")) .parse((new SimpleDateFormat("yyyyMM")).format(date) + "01"); } catch (ParseException e) { return null; } } }