JavaScript toUTCString() method

The JavaScript date toUTCString() method is used to get the particular date in the form of string using UTC time zone.

Syntax:

dateObj.toUTCString();

Return:
String representation of date portion of a Date object UTC time zone.

Example:

<!DOCTYPE html>
<html>
<body>
<script>  
var bday=new Date("November 16, 1994 21:10:10");  
document.writeln(bday.toUTCString());  
</script>  
</body>
</html>

Output:

Wed, 16 Nov 1994 15:40:10 GMT
Please Share