DateTime group by date or hours

Posted by nCdy on Stack Overflow See other posts from Stack Overflow or by nCdy
Published on 2010-03-09T10:35:55Z Indexed on 2010/03/09 11:21 UTC
Read the original article Hit count: 147

Filed under:
|

01.02.2010 0:00:00 -> 01.02.2010 anytime

01.02.2010 0:00:00 -> 01.02.2010 0:any minutes and seconds

so here is my date :

 DateTime x;

it's 01.02.2010 0:00:00 as a string

 x.Date.ToString()

here I compare date

DatarowsForOneDay = dt.Select("DailyRecTime= '" + x.ToString() + "'");

So how can I group by date + Hours without care about minutes and seconds.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET