Code example for DatePicker

Methods: getDayOfMonthgetMonthgetYear

0
	 
	public long getTime() { 
		if (picker != null) {
			Calendar cal = Calendar.getInstance();
			cal.clear();
			cal.set(picker.getYear(), picker.getMonth(), picker.getDayOfMonth());
			return cal.getTimeInMillis();
		} 
		return 0; 
	} 
 
	public void setTime(long time) {
		if (picker != null) {
			Calendar cal = Calendar.getInstance();
			cal.setTimeInMillis(time);
			picker.updateDate(cal.get(Calendar.YEAR), cal.get(Calendar.MONDAY),
					cal.get(Calendar.DAY_OF_MONTH));
			setSummaryTime(cal.getTimeInMillis());
		} 
	}