Convert YYYY/MM/DD To Valid Format
===

I have a date formatted like this from a Java Server:

`YYYY/MM/DD 00:00:00.0`

And that is a format that JavaScript won't accept. So, I do this:

    var startDate = '2012-07-27 00:00:00.0';
	startDate = startDate.substring(0, 10);

Which then kindly returns `2012-07-27`. (Note: I tried it with the time and without)

However, then I want to turn it into a date format I can use to compare two dates. So, I preform this:

    startDate = new Date(startDate);

Which, finally, returns this in the log: `Invalid Date`

So, for the purpose of comparing dates, like so:

    if(currentDate > startDate)

I need to be able to get the format I have into one that will be accepted so I can then compare each of the various dates.

Thanks!