If you are looking for the code to retrieve data based on Datetime field you can use below code
private EntityCollection RetrieveData(DateTime _Date,IOrganizationService _iService)
{
QueryExpression _Query = new QueryExpressio{
EntityName = “EntityName”, //Replace with entityname
ColumnSet = new ColumnSet(“AttributeName”), //list of fields
Criteria =
{
FilterOperator = LogicalOperator.And,
Conditions =
{
new ConditionExpression
{
AttributeName=”_issuedate”, //Replace Condition attribute name
Operator=ConditionOperator.Equal,
Values={_Date } //Replace condition value
}
}
}
};
EntityCollection _Entities = _iService.RetrieveMultiple(_Query);
Return _Entities;
}
Enjoy !!!