 <p>I think StringTokenizer based solution will be the fastest</p> <pre><code>public static int[] splitDateTime(String dateTime) { int[] intParts = new int[5]; StringTokenizer t = new StringTokenizer(dateTime, "/ :"); for (int i = 0; t.hasMoreTokens(); i++) { intParts[i] = Integer.parseInt(t.nextToken()); } return intParts; } public static void main(final String[] args) throws IOException { System.out.println(Arrays.toString(splitDateTime("01/03/2013 09:00"))); } </code></pre> <p>output</p> <pre><code>[1, 3, 2013, 9, 0] </code></pre>