![]() ![]() Locale’s appropriate time representation. Locale’s appropriate date representation. Locale’s appropriate date and time representation. All days in a new year preceding the first Monday are considered to be in week 0. Week number of the year (Monday as the first day of the week) as a decimal number. All days in a new year preceding the first Sunday are considered to be in week 0. Week number of the year (Sunday as the first day of the week) as a zero padded decimal number. Time zone name (empty string if the object is naive).ĭay of the year as a zero-padded decimal number.ĭay of the year as a decimal number. UTC offset in the form +HHMM or -HHMM (empty string if the the object is naive). Microsecond as a decimal number, zero-padded on the left. Hour (12-hour clock) as a decimal number. Hour (12-hour clock) as a zero-padded decimal number. Hour (24-hour clock) as a decimal number. Hour (24-hour clock) as a zero-padded decimal number. Year without century as a zero-padded decimal number. Weekday as a decimal number, where 0 is Sunday and 6 is Saturday.ĭay of the month as a zero-padded decimal number.ĭay of the month as a decimal number. You must follow the below-given format table to use appropriate directives while specifying the format parameter. If the string cannot be parsed according to the given format, or if it has excess data after parsing, a ValueError is raised. ![]() The format parameter has to be a string and has a default value "%a %b %d %H:%M:%S %Y". Here the method does the same job just here the returned value is a struct_time object as returned by gmtime() or localtime().įor both cases, the format parameter uses the same directives as those used by strftime() as given in the format table below. ![]()
0 Comments
Leave a Reply. |