Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pythondatetime cheatsheet

Code Ex		Description
%a	 Sun	Weekday as locale’s abbreviated name.
%A	 Sunday	Weekday as locale’s full name.
%w	 0		Weekday as a decimal number, where 0 is Sunday and 6 is Saturday.
%d	 08		Day of the month as a zero-padded decimal number.
%b	 Sep	Month as locale’s abbreviated name.
%B	 July	Month as locale’s full name.
%m	 09		Month as a zero-padded decimal number.
%y	 13		Year without century as a zero-padded decimal number.
%Y	 2013	Year with century as a decimal number.
%H	 07		Hour (24-hour clock) as a zero-padded decimal number.
%I	 07		Hour (12-hour clock) as a zero-padded decimal number.
%p	 AM		Locale’s equivalent of either AM or PM.
%M	 06		Minute as a zero-padded decimal number.
%S	 05		Second as a zero-padded decimal number.
%f	 000000	Microsecond as a decimal number, zero-padded on the left.
%z	 +0000	UTC offset in the form ±HHMM[SS[.ffffff]] (empty string if the object is naive).
%Z	 UTC	Time zone name (empty string if the object is naive).
%j	 251	Day of the year as a zero-padded decimal number.
%U	 36		Week number of the year (Sunday as the first day of the week) as a zero padded decimal number. All days in a new year preceding the first Sunday are considered to be in week 0.
%W	 35		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 Monday are considered to be in week 0.
%%	 %		A literal '%' character.
%x	 09/08/13	Locale’s appropriate date representation.
%X	 07:06:05	Locale’s appropriate time representation.
%c	 Sun Sep 8 07:06:05 2013	Locale’s appropriate date and time representation.
Comment

PREVIOUS NEXT
Code Example
Python :: dice roller python 
Python :: python check variable is tuple 
Python :: read text from a pdffile python 
Python :: django setup allowed hosts 
Python :: how to know if the numbers is par in python 
Python :: download files requests python 
Python :: window in python 
Python :: ec2 upgrade python 3.7 to 3.8 
Python :: flask post vs get 
Python :: if you assign the result a void function to a variable in python, you get: 
Python :: check if user has manage messages discord.py 
Python :: fiel to base64 python 
Python :: value_counts to list 
Python :: skip rows in pandas read excel 
Python :: windows alert python 
Python :: how to reverse array in ruby 
Python :: frequency unique pandas 
Python :: python loop through list 
Python :: python pearson correlation 
Python :: ses mail name 
Python :: loop rought rows in pands 
Python :: how to print a float with only 2 digits after decimal in python 
Python :: find nan value in dataframe python 
Python :: distribution plot python 
Python :: change plot size matplotlib python 
Python :: how to install python 3.6 ubuntu 
Python :: read csv without index 
Python :: my pygame window wont stay open 
Python :: python opens windows store 
Python :: pandas repeat rows n times 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =