The current piece of code that I am using to do this looks like this,
x3 = new Date(x1.value).format('yyyymmdd');
This works well in Firefox, Chrome and generally everything else, with the exception of the great Internet Explorer.
I Have tried other code such as...
<script>
function parseISO8601(dateStringInRange) {
    var isoExp = /^\s*(\d{4})-(\d\d)-(\d\d)\s*$/,
    date = new Date(NaN), month,
    parts = isoExp.exec(dateStringInRange);
    if(parts) {
      month = +parts[2];
      date.setFullYear(parts[1], month - 1, parts[3]);
      if(month != date.getMonth() + 1) {
        date.setTime(NaN);
      }
    }
    alert(date);
    return date;
}   
parseISO8601('2013-01-21'); 
</script>
This works in all browsers but gives me an output like this.....
Mon Jan 21 2013 00:00:00 GMT+0000 (GMT Standard Time)
when i really need it to look like this
20130121
has anyone had this problem and figured a way to solve it???
 
     
     
    