In this article, you will learn how to get the total number of days between two dates in c#. In this example, we create the TimeSpan object to calculate the difference between the two Dates.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..
In this article, we will learn how to get month number from full month name and from Month Abbreviations in c#. If you need to convert a month number from a full month name such as January to 01, December to 12, then you use this code.Read More..