Python Time asctime() MethodThe 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() MethodDay Mon Date Hour:Min:Sec Year For example: Thu 05 22 09:50:43 2022 Syntax of asctime() This is the syntax for asctime() method Parameters t is a nine-element tuple or struct_time that represents a time as returned by the gmtime() or localtime() functions. Return Value This function gives 24-character string of the form - 'Mon May 23 20:22:05 2022'. Code The Output of the above example code is: time.asctime(t): Mon May 9 22:37:07 2022 Next TopicQ-Learning in Python |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India