This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - compare Date throught API

Sachin - Wednesday, October 19, 2011 12:49 AM:

 if (Txtrelfrom0.Text != "")

{"RELEASE_DATE", Txtrelfrom0.Text.Trim());

qryItem1.setProperty(qryItem1.setPropertyCondition("RELEASE_DATE", "ge");

}

 if(TxtRelTo0.Text != "") {

 qryItem1.setProperty("RELEASE_DATE", TxtRelTo0.Text.Trim());

qryItem1.setPropertyCondition("RELEASE_DATE", "le");

}

Above code overlap my condition Only last condition apply on the document

how can i get document between thses two date?

 

ThanX

Sachin G.



StefanRohde - Thursday, November 3, 2011 11:10 AM:

I would use an AML String for that query. Simply build an AML Query Text with this if condititions.

string aml = "<AML><Item type='ECR' action='get'>"

if (Txtrelfrom0.Text != ""){

aml = aml + "<created_on condition='ge'>2011-05-24T13:00:00(Txtrelfrom0.Text, take care of format)</created_on>"

}

After that, i simply would innovator.apply(aml);