Converting Date Format to numeric Date : <p>I have a Date in this format:</p>

<pre><code>Tue Mar 10 00:00:00 UTC 1987
</code></pre>

<p>It is stored in a Object Date.</p>

<pre><code>Object tmp = solrDoc.getFieldValue("date_from")
</code></pre>

<p>I would like to convert it to a strictly numeric format, without the hours, timezone etc., like</p>

<pre><code>10.03.1987
</code></pre>

<p>This is what I tried so far:</p>

<pre><code>DateFormat date = new SimpleDateFormat("dd.MM.yyyy");
date.format(tmp);
</code></pre>

<p>It returns:</p>

<pre><code> "java.text.SimpleDateFormat@7147a660"
</code></pre>
