10.02.2018 Views

js_tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Javascript<br />

<br />

<br />

<br />

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

document.write( dateobject.toTimeString() );<br />

<br />

<br />

<br />

Output<br />

14:39:07 GMT+0530 (India Standard Time)<br />

toUTCString ()<br />

This method converts a date to a string, using the universal time convention.<br />

Syntax<br />

Its syntax is as follows:<br />

Date.toTimeString ()<br />

Return Value<br />

Returns converted date to a string, using the universal time convention.<br />

Example<br />

Try the following example.<br />

<br />

<br />

JavaScript toUTCString Method<br />

<br />

<br />

<br />

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

document.write( dateobject.toUTCString() );<br />

<br />

<br />

270

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

Saved successfully!

Ooh no, something went wrong!