Code example for SimpleDateFormat

Methods: formatapplyPattern

0
		return new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
	} 
 
	// ���ݵ�ǰʱ���õ�һ���ļ��� 
	private static String capture_name_by_time(){
		SimpleDateFormat sdf = new SimpleDateFormat();
		sdf.applyPattern("yyyyMMdd_HHmmss");
		String str = sdf.format(new Date());
		return "IMG_" + str + ".jpg";
	} 
} 
Experience pair programming with AI  Get Codota for Java