About 20,500,000 results
Open links in new tab
  1. Python program to find day of the week for a given date

    Dec 29, 2023 · Example: In this example, Python code defines a function `check_weekday_or_weekend` that takes a date string as input, converts it to a datetime …

  2. How To Get The Day Of The Week From A Date In Python?

    Jan 9, 2025 · Learn how to get the day of the week from a date in Python using `datetime.strftime ()`, `weekday ()`, and `calendar.day_name`. This guide includes examples.

  3. python - How do I get the day of week given a date? - Stack Overflow

    Use weekday(): >>> import datetime >>> datetime.datetime.today() datetime.datetime(2012, 3, 23, 23, 24, 55, 173504) >>> datetime.datetime.today().weekday() 4 From the documentation: …

  4. Python Get the Day of the Week [5 Ways] – PYnative

    May 2, 2022 · Get the day of the week in Python using the weekday () method. Also, use the strftime () and calendar module to get the weekday name.

  5. How to Find the Day of the Week for a Given Date in Python

    Sep 12, 2024 · Let’s explore several methods to find the day of the week for a given date in Python: 1. Using datetime.weekday () The simplest method to find the day of the week is using …

  6. Python: How to find the day of the week for any date (3 methods)

    Feb 13, 2024 · Here’s how you can use it to find the day of the week: # Specify the date in 'YYYY-MM-DD' format . # strftime('%A') returns the full name of the weekday . print (f'The day of the …

  7. weekday () Function Of Datetime.date Class In Python

    4 days ago · The weekday () function is a built-in method of the datetime.date class in Python. It returns the day of the week as an integer, where Monday is 0 and Sunday is 6. This method is …

  8. How to Get the Day of the Week in Python - Delft Stack

    Feb 2, 2024 · Here’s a complete example of how to get the day of the week from a given date in Python using the datetime module: day_name = days[day_of_week] print(f"The day of the …

  9. Find the day of week with a given date in Python - CodeSpeedy

    Jun 14, 2019 · Find the day of week for a given date in Python with this easy tutorial. Here we have used datetime () module to find the same.

  10. Python: Get the day of the week based on a timestamp/datetime …

    Feb 13, 2024 · To get the day of the week, you can use the %A directive, which returns the full weekday name, and %a for the abbreviated name. print (today.strftime('%A')) # Shows full …

  11. Some results have been removed