Tag: DateTime
How to get the AM or PM value from a DateTime object in C# ?
There are times when you might want to get only the string AM or PM from the DateTime object that you have. How to get the AM or PM value from a DateTime object in C# ? You can get this by using the format specifiers in the ToString method as shown in the code snippet.
How to compare only Date without Time in DateTime datatype in C#?
There are times when you might want to compare only the date parts of two DateTime variable in C#. How to compare only Date without Time in DateTime datatype in C#? You can easily compare using the Date property from the DateTime object.