Community
Showing results for 
Search instead for 
Do you mean 
Reply

DateTime lookup not supported?

Highlighted
Copper Contributor
Posts: 151
Country: Netherlands

DateTime lookup not supported?

I try to get all contacts edited after <DateTime value>.

If I do this in Act! it works as expected (Edit Date, OnOrAfter, <type some date>)

 

But in the SDK when I do this:

 

MutableEntityFieldDescriptor desc_EditDate = ACTFM.Contacts.GetFieldDescriptor("TBL_CONTACT.EDITDATE", true);
CriteriaColumn col_EditDate = ACTFM.Lookups.GetCriteriaColumn(desc_EditDate);
Criteria crit_EditDate = new Criteria(Act.Framework.Lookups.LogicalOperator.And, 0, 0, col_EditDate, OperatorEnum.OnOrAfter, LastSyncTime);
crits.Add(crit_EditDate);

 

it complains about the criterium having an operator that is not valid for the specified column..

 

However, if I ToString() the dateTime value, it works (see below). I don't think this should be the way to work. This way it does not take the timezone and summertime/wintertime into account.  

 

Can this be fixed? 

 

 

 

MutableEntityFieldDescriptor desc_EditDate = ACTFM.Contacts.GetFieldDescriptor("TBL_CONTACT.EDITDATE", true);
CriteriaColumn col_EditDate = ACTFM.Lookups.GetCriteriaColumn(desc_EditDate);
Criteria crit_EditDate = new Criteria(Act.Framework.Lookups.LogicalOperator.And, 0, 0, col_EditDate, OperatorEnum.OnOrAfter, LastSyncTime.ToString("yyyy-MM-dd")); // Works, but not the way it should...
crits.Add(crit_EditDate);

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands