import datetime
now = datetime.datetime.now()
print(now.strftime("%A"))
See the Python docs for datetime.now, datetime.strftime and more on strftime.
More Related Contents:
- Converting datetime.date to UTC timestamp in Python
- How to convert local time string to UTC?
- Filtering Pandas DataFrames on dates
- How to print pandas DataFrame without index
- Converting string with UTC offset to a datetime object [duplicate]
- How do I convert a datetime to date?
- Trying to mock datetime.date.today(), but not working
- Most recent previous business day in Python
- Convert string date to timestamp in Python
- Getting today’s date in YYYY-MM-DD in Python?
- type object ‘datetime.datetime’ has no attribute ‘datetime’
- python – datetime with timezone to epoch
- Python speed testing – Time Difference – milliseconds
- What exactly does the T and Z mean in timestamp?
- Comparing two date strings in Python
- Get year, month or day from numpy datetime64
- Difference between Python datetime vs time modules
- Natural/Relative days in Python
- Why can’t I subclass datetime.date?
- Convert string “Jun 1 2005 1:33PM” into datetime
- Python time to age, part 2: timezones [duplicate]
- Python pandas convert datetime to timestamp effectively through dt accessor
- Which is the fastest way to extract day, month and year from a given date?
- Get time zone information of the system in Python?
- Locate first and last non NaN values in a Pandas DataFrame
- Pandas custom function to find whether it is the 1st, 2nd etc Monday, Tuesday, etc – all suggestions welcome
- Convert a column of timestamps into periods in pandas
- Python: Adding hours to pandas timestamp
- how to specify the datetime format in read_csv
- Python generating a list of dates between two dates