In this article, you will learn how to add and subtract years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds from DateTime in the SQL server. DateTime manipulation is the most common scenario is when we fetching data from the database or storing data in a database. Here, in this article, we will use the SQL server built-in DATEADD() function to add or subtract the days from the specific date.Read More..
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..
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..
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..
In this article, we will learn how to get the only time part from DateTime in C#. we will use the DateTime object to initialize the date with time. And use the ToString() method to format the DateTime to get the time. In this program, we will use time format specifiers to get the time only from the Datetime object.Read More..
In this article, we will learn how to get a month's name from the month number in c#. In this article, we will use DateTime formatting and DateTimeFormat class methods that belong to System.Globalization.CultureInfo.CurrentCulture get a month's name from the month number.Read More..
In this article, we will learn how to get a total number of days in the month in c#. There are two built-in methods to get the total number of days in a month. The first method is DateTime.DaysInMonth(year, month) and the second method is CultureInfo.CurrentCulture.Calendar.GetDaysInMonth(year,month).Read More..