- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is weekday() method in python?
The weekday() method is used to returns the particular day of the week.
import datetime import calendar #defining function named called findweekDay def findWeekDay(date): i = datetime.datetime.strptime(date, '%d %m %Y').weekday() return (calendar.day_name[i]) date = '24 05 2019' print(findWeekDay(date))
- Related Articles
- Calendar Functions in Python -(monthrange(), prcal(), weekday()?)
- Python - Get the weekday from Timestamp object in Pandas
- What is zfill() method in Python?
- What is random.uniform method in Python?
- What is prmonth() method in python?
- What is Python commit() method in MySQL?
- Display weekday names in Java
- What is the rollback() method in Python MySQL?
- What is usage of update method in Python dictionary?
- What is the groups() method in regular expressions in Python?
- What is the most efficient string concatenation method in python?
- What is the fetchone() method? Explain its use in MySQL Python?
- How to set the first day of each week to weekday using Python?
- What does method time.tzset() do in Python?