 <p>The reason this doesn't work is because the deprecated <code>Date</code> constructor that you're using expects <code>year - 1900</code> as the first argument.</p> <p>You should either use a <code>SimpleDateFormat</code> or a <code>GregorianCalendar</code> to do this conversion instead. Since there is already an excellent answer here, showing the use of <code>SimpleDateFormat</code>, here's how you use <code>GregorianCalendar</code> for 1:39am on 14 March 2014.</p> <pre><code>new GregorianCalendar(2014, 2, 14, 1, 39, 0).getTime().getTime(); </code></pre> <p>Beware that the month uses 0 for January and 11 for December.</p>