public static long convertDateStringCompactToTimstamp(String timestring) throws NullPointerException, NumberFormatException {
  int dayOfMonth=Integer.parseInt(timestring.substring(0,2));
  int month=Integer.parseInt(timestring.substring(3,5));
  int year=Integer.parseInt(timestring.substring(6));
  Calendar cal=Calendar.getInstance();
  cal.set(Calendar.YEAR,year);
  cal.set(Calendar.MONTH,month - 1);
  cal.set(Calendar.DAY_OF_MONTH,dayOfMonth);
  cal=reduceCalendar(cal);
  return cal.getTimeInMillis();
}

public static long convertDateStringCompactToTimstamp ( String timestring ) throws NullPointerException , NumberFormatException { int dayOfMonth = Integer . parseInt ( timestring . substring ( 0 , 2 ) ) ; int month = Integer . parseInt ( timestring . substring ( 3 , 5 ) ) ; int year = Integer . parseInt ( timestring . substring ( 6 ) ) ; Calendar cal = Calendar . getInstance ( ) ; cal . set ( Calendar . YEAR , year ) ; cal . set ( Calendar . MONTH , month - 1 ) ; cal . set ( Calendar . DAY_OF_MONTH , dayOfMonth ) ; cal = reduceCalendar ( cal ) ; return cal . getTimeInMillis ( ) ; }
convert a timestamp in compact format ( dd - mm - yyyy ) into milliseconds
