Python Time asctime() Method
The asctime() method turns a tuple or struct time representing a time provided by gmtime() or localtime() into a 24-character text of the type 'Mon May 23 20:22:05 2022'.
Example of asctime() Method
Day Mon Date Hour:Min:Sec Year
Thu 05 22 09:50:43 2022
Syntax of asctime()
This is the syntax for asctime() method
t is a nine-element tuple or struct_time that represents a time as returned by the gmtime() or localtime() functions.
This function gives 24-character string of the form - 'Mon May 23 20:22:05 2022'.
The Output of the above example code is:
time.asctime(t): Mon May 9 22:37:07 2022
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week