Calendar cal=Calendar.getInstance();
String tY=String.valueOf(cal.get(Calendar.YEAR));
String tM=String.valueOf(cal.get(Calendar.MONTH));
	if (tM.length()<2){ tM="0"+tM;  }
String tD=String.valueOf(cal.get(Calendar.DATE));
	if (tD.length()<2){ tD="0"+tD;  }
String tH=String.valueOf(cal.get(Calendar.HOUR_OF_DAY));
	if (tH.length()<2){ tH="0"+tH;  }
String tMin=String.valueOf(cal.get(Calendar.MINUTE));
        if (tMin.length()<2){ tMin="0"+tMin;  }
String t_allCurrentTime=tY+tM+tD+tH+tMin;

By admin-powenko

Dr. Powen Ko is a teacher and CEO on LoopTek LLC, and like to teaching. if you need to class, please let PowenKo know, he will love to service and sharing. LoopTek web site is

Leave a Reply