10.02.2018 Views

js_tutorial

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Javascript<br />

<br />

JavaScript toString Method<br />

<br />

<br />

<br />

var dateobject = new Date(1993, 6, 28, 14, 39, 7);<br />

stringobj = dateobject.toString();<br />

document.write( "String Object : " + stringobj );<br />

<br />

<br />

<br />

Output<br />

String Object : Wed Jul 28 1993 14:39:07 GMT+0530 (India Standard Time)<br />

toTimeString ()<br />

This method returns the time portion of a Date object in human readable form.<br />

Syntax<br />

Its syntax is as follows:<br />

Date.toTimeString ()<br />

Return Value<br />

Returns the time portion of a Date object in human readable form.<br />

Example<br />

Try the following example.<br />

<br />

<br />

JavaScript toTimeString Method<br />

269

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!