Welcome to online timestamp converter
<script>
function timeToHuman()
{
function timeToHuman()
{
if(document.getElementById('timeStamp').value==''){
alert("Please enter UNIX timestamp format");
return false;
}
var theDate = new Date(document.getElementById('timeStamp').value * 1000);
dateString = theDate.toGMTString();
document.getElementById('humanReadable').innerHTML = dateString;
}
</script>
var theDate = new Date(document.getElementById('timeStamp').value * 1000);
dateString = theDate.toGMTString();
document.getElementById('humanReadable').innerHTML = dateString;
}
</script>
<form action="#">
<input type="text" name="strtotimestamp" value="1454563147" id="timeStamp"/>
<input type="button" value="Get Date" onClick="timeToHuman();" />
<input type="reset" value="Reset"/>
<p>
Output <span id="humanReadable"></span>
</p>
</form>
0 comments:
Post a Comment