show/hide this revision's text 3 tags
show/hide this revision's text 2 sp

I haven't completely convinced myself of this yet, but I am starting to think that the CBugEventQuery.SetParamDate method ignores the time part of the date passed in.

The following code returns all bugevents up to, but not including the current day. If I manually edit the date in the BugEvent table to "remove the time" (aka set it to midnight), the query then returns the current day.

CBugEventQuery eventQuery = api.BugEvent.NewBugEventQuery();
....          
eventQuery.AddWhere("dt<=@LastDate");
eventQuery.SetParamDate("@LastDate", System.DateTime.Now);
...

Can someone conform confirm that the above query should return any event on or before the current time/date?

show/hide this revision's text 1

CBugEventQuery.SetParamDate ignoring time?

I haven't completely convinced myself of this yet, but I am starting to think that the CBugEventQuery.SetParamDate method ignores the time part of the date passed in.

The following code returns all bugevents up to, but not including the current day. If I manually edit the date in the BugEvent table to "remove the time" (aka set it to midnight), the query then returns the current day.

CBugEventQuery eventQuery = api.BugEvent.NewBugEventQuery();
....          
eventQuery.AddWhere("dt<=@LastDate");
eventQuery.SetParamDate("@LastDate", System.DateTime.Now);
...

Can someone conform that the above query should return any event on or before the current time/date?