How to validate dates in two different formats : <p>I am doing some junit test. I am getting the date as response in the form of date as below :</p>

<pre><code>2017-08-14 00:00:00.0 +0:00
</code></pre>

<p>The data which is present in oracle DB is </p>

<pre><code>14-AUG-17 12.00.00.000000000 AM +00:00
</code></pre>

<p>I want to use an assert like this but it is failing. can anyone help to make sure that both expected and actual matches.</p>

<pre><code>Assert.assertEquals("14-08-2017", 2017-08-14 00:00:00.0 +0:00); 
</code></pre>
