How do we remove quotes "" out of a string??

How do we remove quotes "" out of a string??

Hello Everyone,

I am tired of looking for an answer to remove quotes out of a string. Here is the scenario:

  1. var element = document.getElementById("DateTimeField");
  2. var value = element.value; //value is "2012,10,30  10:30:24"
  3. did some string operations of split and concatenation and now
  4. value = "2012,10,30,10,30,24" which is in the form of "yyyy,mm,dd,hh,mm,ss"
  5.  
  6. var d = Date.UTC(value); gives NAN, bacause of the quotes
So i have to remove the quotes, This is what i have tried to remove quotes:

  1. value.replace(/['"]/g,'');
  2. value.replace(/["']{1}/gi,"")
  3. value.valueOf()
  4. parseInt(value)
  5. parseFloat(value)
  6. value.unquoted()

Nothing has worked, can someone suggest me how to achieve it?