JSFiddle - React, Tailwind, and code Playground
HTML
<input id="mytime" name="mytime" type="datetime" value="2011-08-18T16:49Z" />
<a href="#" onclick="formatTime(); return false;">Click to output formatted time</a>
<div id="output"></div>
JavaScript
function formatTime() {
// Load datetime string into js date object
var d = new Date(document.getElementById('mytime').value)
// Output date as month/day/year
document.getElementById('output').innerHTML = (d.getMonth()+1) + '/' + d.getDate() + '/' + d.getFullYear();
}