Beginner |
|
Joined: Thu May 12, 2005 2:14 am Posts: 33 Location: Sweden, Sk
|
Hi
I need to get the timespan between to dates. I store thoose two dates as SQL DateTime types in the database.
In my custom query i do.
(isnull(cast( (select sum(datediff(s, StartTime, StopTime)) from workedTime where StartTime >= :startDate and StopTime <= :stopDate and workedTime.assistant_id = assistants.assistant_id) as bigint),0)
* 10000000) as {rep.WorkedTime}
But it seems to return wrong values for the timespan object.
Can somebody see where its wrong? Or is there some other way of doing it?
|
|