Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (13.1k points)
Can anyone help me how I can able to change the date format using JavaScript?

1 Answer

0 votes
by (26.7k points)

You can take the below example as a reference:

<script src="http://www.datejs.com/build/date.js" type="text/javascript"></script>

<script>

   var mydate = new Date(form.startDate.value);

   var str = mydate.toString("MMMM yyyy");

   window.alert(str);

</script>

I hope this will help.

Want to know more about Java? Prefer this tutorial on Learn Java.

Want to become a Java Expert? Join Java Course now!!

Related questions

0 votes
1 answer
asked Jan 28, 2021 in Java by dante07 (13.1k points)
0 votes
1 answer
asked Mar 15, 2021 in Java by dante07 (13.1k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...