Code example for Format

Methods: format

0
		dateButton.setText(dateFormatter.format(date));
	} 
 
	public void updateTime() { 
		if (timeButton != null)
			timeButton.setText(timeFormatter.format(date));
	} 
 
	public void onClick(View v) {
		if (v == timeButton)
			new TimePickerDialog(activity, this, date.getHours(),
					date.getMinutes(), Preferences.is24HourFormat(activity))
					.show();
		else 
			new DatePickerDialog(activity, this, 1900 + date.getYear(),
					date.getMonth(), date.getDate()).show();
	} 
}