Pythom time technique strftime() converts a tuple or struct_time representing a period as returned by gmtime() or localtime() to a sequence as specified by the argument that is format.
If t is certainly not supplied, the present time as came back by localtime() is employed. structure must certanly be a string. An exception ValueError is raised if any industry in t is not in the permitted range.
T в€’ This is the right amount of time in amount of moments to be formatted.
format в€’ This is basically the directive which may be employed to format offered time. Listed here directives can be embedded into the format string в€’
%a – abbreviated weekday title
%A – complete weekday title
%b – abbreviated thirty days title
%B – complete thirty days title
%c – preferred time and date representation
%C – century quantity (the divided by 100, range 00 to 99 year)
%d – of the month (01 to 31 day)
%e – of the month (1 to 31 day)
%g – like %G, but without having the century
%G – 4-digit year corresponding to the ISO week quantity (see %V).