You need to sign in to do that
Don't have an account?
Trouble updating Date field in C#
I am unable to update a Date field in Salesforce via C#.
I read the post here: http://community.salesforce.com/sforce/board/message?board.id=NET_development&thread.id=4069. I attempted to install the patch (NDP20-KB925272-X86.exe) but received a message saying that the program to be updated does not exist on my computer. I have C# Express, not the full version. Perhaps that is the problem?
I have also tried editing the WSDL by remarking out the xsd:date and changing all fields which are date to DateTime in the WSDL.
Perhaps I am not coding it properly. This is what I have tried so far:
string LDA_Date = parsedCSVData[(i * NUM_COLUMNS) + 8]; DateTime dt = System.DateTime.Parse(LDA_Date); String dt2 = dt.ToUniversalTime().ToString("M-d-yyyy"); Log.Text += dt2.ToString() + "\n"; DateTime dt3 = Convert.ToDateTime(dt2); LDARecs[i].LDA__c = dt3;
I have also tried formatting it using "yyyy-MM-dd" and "MM-dd-yyyy"
I have been able to update string fields. LDA__c is a Date (not DateTime) field in Salesforce.
Thanks for any help that could be provided,
Chris
All Answers