How to use toISOString in JavaScript

In this article I am going to explain about toISOString() method in JavaScript.
  • 1737

JavaScript toISOString() Method

JavaScript toISOString() method also use for convert date object in string format but its use ISO standard. ISO Standard is (YYYY-MM-DDTHH:mm:ss.sssZ) and its called ISO-8601






    <script type="text/javascript">

        function myfun() {

            var dd = new Date();

            var mm = document.getElementById("tst");

            mm.innerHTML = dd.toDateString();






        click button to show Date</p>

    <h1 id="tst" style="color: Blue" s>


    <button onclick="myfun()">

        click me</button>








You may also want to read these related articles: here
Ask Your Question 
Got a programming related question? You may want to post your question here


More Articles

© 2020 DotNetHeaven. All rights reserved.