how can I exchange e.Day.Date.ToLocalTime() by the Textbox.Text value.
I have this code:
string FullQuery = "<Where><And><Eq><FieldRef Name='{0}' /><Value Type='DateTime'>{1}</Value></Eq><Eq><FieldRef Name='Pracownik' /><Value Type='Text'>{2}</Value></Eq></And></Where>";
string dateISO = SPUtility.CreateISO8601DateTimeFromSystemDateTime(Convert.ToDateTime(TextBox4.Text).ToLocalTime());
var query1 = new SPQuery();
query1.Query = String.Format(FullQuery, Convert.ToDateTime(TextBox4.Text).ToLocalTime(), dateISO, DropDownList1.SelectedItem.Text);
query1.ViewFields = "<FieldRef Name='Kontrakt' /><FieldRef Name='Procenty' />";
query1.ViewFieldsOnly = true;
SPListItemCollection listaDniPrzeznaczonychNaProjekt = witryna.Lists["Szczegoly"].GetItems(query1);
foreach (SPListItem olistaDniProjektowych in listaDniPrzeznaczonychNaProjekt)
{
Label4.Text += olistaDniProjektowych["Kontrakt"].ToString();
}
And I want to put there Textbox.Text
The debuger says me that the same of filds are incorect.
TextBox4.Text).ToUniversalTime().AddHours(2.0)– Grzegorz Z Oct 31 '12 at 12:21