 <p>You've put your XML traversal inside a string. That traversal won't happen if it's not actual javascript. Additionally, moment.js will try to parse that literal string as a date, NOT the value from that traversal.</p> <pre><code>'x[i].getElementsByTagName("Date")[0].childNodes[0].nodeValue' </code></pre> <p>You need to unquote your traversal to get its value, then feed that to moment.js.</p> <pre><code>var utcDate = moment.utc(x[i].getElementsByTagName("Date")[0].childNodes[0].nodeValue, 'DD/MM/YYYY HH:mm'); </code></pre>