
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How to convert a date to a string using the universal time convention?
To convert a date to a string using the universal time convention, use the toUTCString() method. It returns converted the date to a string, using the universal time convention.
Example
You can try to run the following code to learn how to convert a date to a string using UTC −
<html> <head> <title>JavaScript toUTCString Method</title> </head> <body> <script> var dateobject = new Date(2018, 0, 15, 14, 39, 7); document.write( dateobject.toUTCString() ); </script> </body> </html>
- Related Articles
- How to convert UTC date time into local date time using JavaScript?
- Pandas program to convert a string of date into time
- How to convert a Python date string to a date object?
- How to convert ISO 8601 String to Date/Time object in Android using Kotlin?
- Set the milliseconds for a specified date according to universal time.
- Set the seconds for a specified date according to universal time.
- Set the minutes for a specified date according to universal time.
- Set the month for a specified date according to universal time.
- Set the hour for a specified date according to universal time?
- How to convert a String into a Date object using JDBC API?
- How to Convert Number String to Date and Time in Excel?
- Set the full year for a specified date according to universal time.
- How to convert a date to a string using current locale's conventions?
- How to convert a JavaScript date object to a string?
- How to convert a string to date in MySQL?

Advertisements