toLocaleString()

We can convert date object to local string format by using toLocalString function.
Date.toLocaleString();
Sample code
<script type="text/javascript"> 
var dt= new Date();
document.write(dt + "<br><br>");
document.write(dt.toLocaleString());
</script>
The output is here

Your Rating





More on JavaScript Date & Time

Post Comment This is for short comments only. Use the forum for more discussions.




HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2019 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer