Showing results for 
Search instead for 
Do you mean 

Getting activities with duration smaller than...

Copper Contributor
Posts: 220
Country: Netherlands

Getting activities with duration smaller than...

I have a customer database with a lot of very long activities(long like in 400 days or so). I am building a program to get the free timeslots in the agenda, 

and have a hard time figuring out how to filter out those long activities. It should only count the activities of one day or shorter.

I should get for one day like 4 activities, I get 1273 activities which are all very long and not of the same start date.


If I do the following:


ActivityComparisonFilterCriteria crit_duration = new ActivityComparisonFilterCriteria(
new ActivityFieldDescriptor(ActivityField.DurationValue),
(long)24*3600 * 10000000); // 24 hours. Because the DurationValue is 10 million times the amount of seconds




al = ACTFM.Activities.GetActivitiesForAvailabilty(
new ActivitySortCriteria(new ActivityFieldDescriptor(ActivityField.StartTime), System.ComponentModel.ListSortDirection.Ascending),
new IActivityFilterCriteria[] { crit_iscleared },
new Act.Framework.ActivityAccessors.ActivityAccessor[0],


I get the following error:


{Act.Framework.Activities.ActivityManagerDB+ActivityManagerDBException: Error retrieving a list of Activity Instances for the specified Accessors: Arithmetic overflow error converting expression to data type smalldatetime.


I encounter the exact same error with GetActivitiesForCalendar and cGetActivityList.


What can this be?



ACT Certified Consultants
the Netherlands