How to split the Crmdatetime to date in CRM RRS feed

  • General discussion

  • Dear all,

    I have a doubt in splitting a datetime field in conditional expression

    suppose i have a transaction date t1 as 2/1/2011

    another table table1 has a column as datetime d1

    now i want to get the values by comparing the date t1 with d1 and get the values.So for that i have used 

    private static RetrieveMultipleResponse RetriveAutoDebitTransactions(CrmService crmService,String MID,CrmDateTime Transactiondate)
    QueryExpression helptranquery = new QueryExpression();
    helptranquery.EntityName = "table1";
    helptranquery.ColumnSet =new AllColumns();
    ConditionExpression condition_flags = new ConditionExpression();
    condition_flags.AttributeName ="pos_mid";
    condition_flags.Operator =ConditionOperator.NotEqual;
    condition_flags.Values = new object[] { MID };
    ConditionExpression condition_status = new ConditionExpression();
    condition_status.AttributeName = "pos_vasdate2";
    condition_status.Operator =ConditionOperator.Equal;
    condition_status.Values = new object[] { Transactiondate };
    helptranquery.Criteria =new FilterExpression();
    helptranquery.Criteria.FilterOperator =LogicalOperator.And;
    RetrieveMultipleRequest helptransrequest = new RetrieveMultipleRequest();
    helptransrequest.Query = helptranquery;
    helptransrequest.ReturnDynamicEntities =true;
    RetrieveMultipleResponse heldtransresponse = crmService.Execute(helptransrequest) as RetrieveMultipleResponse;
    return heldtransresponse;
    pl help me thanks.

    Thursday, January 12, 2012 1:34 PM