Tuesday, 12 February 2013

Get Present Date using Calendar in Android ?

// get the Calendar
Calendar c = Calendar.getInstance();

// get the year,month,day
int cYear = c.get(Calendar.YEAR);
int cMonth = c.get(Calendar.MONTH);
int cDay = c.get(Calendar.DAY_OF_MONTH);

No comments:

Post a Comment