JavaScript toString() Method
Complete Date Object Reference
Definition and Usage
The toString() method converts a Date object to a string and returns the result.
Syntax
Example
In this example we will convert today's date to a string:
<script type="text/javascript">
var d = new Date();
document.write (d.toString());
</script>
|
The output of the code above will be:
Try-It-Yourself Demos
toString()
How to use toString() to convert today's date to a string.
Complete Date Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|