if (newsStory.WhenAdded.Date == DateTime.Today)
{
}
else
{
}
Should do the trick.
More Related Contents:
- DateTime vs DateTimeOffset
- Parse DateTime with time zone of form PST/CEST/UTC/etc
- Convert UTC/GMT time to local time
- String was not recognized as a valid DateTime ” format dd/MM/yyyy”
- Is DateTime.Now the best way to measure a function’s performance? [closed]
- Algorithm to detect overlapping periods [duplicate]
- Creating a DateTime in a specific Time Zone in c#
- How to create a .NET DateTime from ISO 8601 format
- How to get difference between two dates in Year/Month/Week/Day?
- How to know if a DateTime is between a DateRange in C#
- How do I get the last day of a month?
- Measuring code execution time
- Get Month name from month number
- How do I represent a time only value in .NET?
- Convert DateTime for MySQL using C#
- Convert DateTime to Julian Date in C# (ToOADate Safe?)
- Parse C# string to DateTime
- DateTime ToString issue with formatting months with “mm” specifier
- Difference between System.DateTime.Now and System.DateTime.Today
- How do I get the AM/PM value from a DateTime?
- Getting Date or Time only from a DateTime Object
- How can I format DateTime to web UTC format?
- Convert String to Date in .NET if my incoming date format is in YYYYMMDD
- How to parse and generate DateTime objects in ISO 8601 format
- DateTime conversion from string C#
- DateTime.Parse(“2012-09-30T23:00:00.0000000Z”) always converts to DateTimeKind.Local
- Getting the first and last day of a month, using a given DateTime object
- Convert DateTime to long and also the other way around
- LINQ Query to Convert string to datetime
- .NET DateTime to SqlDateTime Conversion