function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SanalSanal 

date insertion problem

Hi,

I wanted to upload records from Access(local PC, using C#) to salesforce.com. But, when i do this, my datetime fields are getting changed according to the timezone settings. How can i create an exact replica of my access data in salesforce.com without these kind of validations?

Please help!
Sanal
SuperfellSuperfell
DateTime's in .NET have no concept of TZ, so the .NET WS stack always assumes that DateTime instances are in the local TZ. If you want it to do the right thing, you're going to have to convert the dateTimes to the local TZ before making the WS call.
SanalSanal
Thanks Simon,

Creating a date field in salesforce.com to store my datetime values (since the content is date only) solves my problem, as it seems that there is no conversion happening for this scenario.

Anyway, i will try in the way that you've specified.

Regards,
Sanal.