Java
dt.Columns.Add("CaseNumber");
dt.Columns.Add("Subject");
dt.Columns.Add("Description");
dt.Columns.Add("Owner");
dt.Columns.Add("CreatedDate");
for (int i = 0; i < qr.records.Length; i++)
{
Case newCase = (Case)qr.records[i];
DataRow dr = dt.NewRow();
dr["CaseNumber"] = newCase.CaseNumber;
dr["Subject"] = newCase.Subject;
dr["Description"] = newCase.Description;
dr["Owner"] = newCase.Owner.Name1;
dr["CreatedDate"] = newCase.CreatedDate;
dt.Rows.Add(dr);
naura paxRank #2,843 · 502 reputationPosted Oct 30, 2009, 9:44 PM EDT
you can sort and filter using datatable's select method which returns a datarow array:
DataRow[] drArr=dt.Select("OrderNo='" + txtOrderNo.Text + "'","[CreateDate] Desc");
// There is a single quote after OrderNo= and in third string in first argument, //second argument is optional.
DataTable dtNew=new DataTable();
for(int i=0;i
Sam HobbsRank #107 · 20.5K reputationPosted Oct 30, 2009, 10:32 PM EDT
jingeRank #2,527 · 554 reputationPosted Oct 31, 2009, 1:54 AM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Oct 31, 2009, 8:14 PM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Oct 31, 2009, 8:17 PM EDT
Joseph17 reputationPosted Nov 2, 2009, 4:53 AM EST
" at the end of the line for it to start a new line. Again, I will update you in just a while to let you know how things pan out. Thanks so much for the suggestions btw.
Joseph17 reputationPosted Nov 2, 2009, 6:57 AM EST
The query that you built for me in LINQ works beautifully sans one problem. It is pulling the oldest date up to the time but it does not take in to account AM/PM. So, the earliest records is in this format "10/29/2009 10:00:45 PM", however, the earliest records should be "10/29/2009 10:00:53 AM". Know of any solution? It would be much easier if it were in 24-hour format instead of 12, but, unfortunatley, it isn't :). And, I had to change "query.Max(p => p.CreatedDate))" to "query.Min..." in order for it to pull the older times. I really appreciate all of your help thus far.
Joseph17 reputationPosted Nov 2, 2009, 10:01 AM EST
Sam HobbsRank #107 · 20.5K reputationPosted Nov 2, 2009, 10:56 AM EST
Sam HobbsRank #107 · 20.5K reputationPosted Nov 2, 2009, 10:59 AM EST