;

Tags: Python Date Formating Articles


How to Find Yesterday’s, Today’s and Tomorrow’s date in Python

Tutorialsrack 29/04/2020 Python

In this article, we will learn how to find yesterday's, today’s, and tomorrow’s date in python. We will use the datetime.today() to get the current date from the datetime module. And timedelta class is used to manipulate the date by incrementing or decrementing the days by 1 from today’s date to get the yesterday and tomorrow date.

Read More..

How to Find the Current Day is Weekday or Weekends in Python

Tutorialsrack 29/04/2020 Python

In this article, we will learn how to find the current day is the weekday or weekends in python. For today's date, we use datetime.today() function from datetime module and weekday() function to get the week number from the date and check if the week no. is greater than 5 then its a weekend otherwise it is a weekday.

Read More..

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

Tutorialsrack 29/04/2020 Python

In this article, we will learn how to find the day of the week for a given date in python.  There are many ways to find the day of a week for a given date. In this article, to find the day of the week for a given date, we use the strptime(), strftime() or weekday() function.

Read More..
Recent Posts
Tags