replace function in Javascript (date and time)
<p>Anyone can help me with the "replace" function in Javascript? I'm trying to get only the date of an automatic text box where's showing the date &amp; time:</p>

<p>In the text box I have: <strong>24-Jun-2016 06:00:00 PM</strong>
And I only need the date "<strong>24-Jun-2016</strong>"</p>

<p>I used the replace function in others text boxes and worked! but I'm complete loss of to use it to get only the date!:</p>

<p>I tried this but it's showing nothing:</p>

<pre><code>var nrd=document.getElementById('nextResponse').value;
</code></pre>

<p><code>nrd=nrd.replace('00:00:00', '')</code>;</p>

<pre><code>nrd=nrd.replace('PM', '');
</code></pre>

<p>Any help will be appreciate it!</p>