Continuation of Count difference between two numbers
<p>I have <a href="http://jsfiddle.net/vQnHz/5/" rel="nofollow">this Example</a> which does not work in IE, but works in all other browsers can you take a look. What is the problem here?
Note: This is a continuation of <a href="http://stackoverflow.com/questions/7117875/count-number-of-days-between-2-dates-in-javascript">this</a></p>

<p><strong>Updated</strong> : The problem is my example works in chrome but gives NaN in IE 8 and firefox 6. </p>

<p>My Code</p>

<pre><code>var cellvalue="2011-08-18 11:49:01.0 IST";
var firstDate = new Date();
var secondDate = cellvalue.substring(0, cellvalue.length-4);
alert(diffOf2Dates(firstDate,secondDate));
function diffOf2Dates(todaysDate,configDate)
{
/*var udate="2011-08-18 11:49:01.0";
var configDate=new Date(udate);*/

var oneDay = 24*60*60*1000; // hours*minutes*seconds*milliseconds
var firstDate = todaysDate; // Todays date
var secondDate = new Date(configDate);

var diffDays = Math.abs((firstDate.getTime() - secondDate.getTime())/(oneDay));


return Math.ceil(diffDays);
}
</code></pre>

<p><strong>Note: My format</strong></p>

<pre><code>2011-08-19 11:49:01.0 IST
</code></pre>
