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
|
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