DateTime date = Convert.ToDateTime(i + "/15/15"); BudgetEntries.BudgetEntries entry = new BudgetEntries.BudgetEntries() { G_L_Account_No = split[1], AmountSpecified = true, Amount = Convert.ToDecimal(split[5 + i]), Global_Dimension_1_Code = split[2], Global_Dimension_2_Code = split[3], Budget_Dimension_3_Code = split[4], Budget_Dimension_4_Code = split[5], DateSpecified = true, Date = date, Budget_Name = split[0], Entry_No = entryno, Entry_NoSpecified = true }; Client.Create(ref entry);The "split" array is a line of tab-delimited text that the program loops through to read the data. The variable "i" is incremented in a while loop to get each month's Amount. I have confirmed that the "entry" variable has a date, as
Console.WriteLine(entry.Date);produces 1/15/2015 12:00:00 AM.
Comments
Have you tried to use Date instead of DateTime?
i.e. DateTime dateOnly = date1.Date;
and then just pass dateOnly ?
regards, wisa