You need to sign in to do that
Don't have an account?
Varun Chopra
Salesforce is setting date one day off to the original date while uploading csv file using apex.
I am trying to upload a csv file in salesforce through apex code. In salesforce after uploading the csv file , date field is showing one day off.
For e.g. I am uploading 16-08-2015 in date field but in salesforce it shows 15-08-2015.
I know it is due to timezone problem but i want to resolve it. Can anyone have any idea to resolve this??
Thanks in advance!!!!
For e.g. I am uploading 16-08-2015 in date field but in salesforce it shows 15-08-2015.
I know it is due to timezone problem but i want to resolve it. Can anyone have any idea to resolve this??
Thanks in advance!!!!
date_field__c = system.today.add(1)
public Datetime current = System.now(); // returns date time value in GMT time zone.
public TimeZone tz = UserInfo.getTimeZone(); // returns the user time zone.
public DateTime ddayDateTime = current.AddSeconds(tz.getOffset(current)/1000);