How to check if a DateTime occurs today?
if( newsStory.Date == DateTime.Today )
{
// happened today
}
if (newsStory.WhenAdded.Date == DateTime.Today)
{
}
else
{
}
Should do the trick.
if( newsStory.Date == DateTime.Today )
{
// happened today
}
if (newsStory.WhenAdded.Date == DateTime.Today)
{
}
else
{
}
Should do the trick.