+ Start a Discussion
Haneesh reddy 13Haneesh reddy 13 

i need to get time from Salesforce API to Salesforce server.

Hi 

With the Salesforce API, is there any way to get the current time on the Salesforce server?

Can any one please help me out.
Best Answer chosen by Haneesh reddy 13
AbhishekAbhishek (Salesforce Developers) 
Yes, you can use the getServerTimestamp() method:

GetServerTimestampResult timestamp = binding.getServerTimestamp();

See Salesforce API Docs: getServerTimestamp() (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_quickstart_intro.htm)

Thanks.

All Answers

AbhishekAbhishek (Salesforce Developers) 
Yes, you can use the getServerTimestamp() method:

GetServerTimestampResult timestamp = binding.getServerTimestamp();

See Salesforce API Docs: getServerTimestamp() (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_quickstart_intro.htm)

Thanks.
This was selected as the best answer
Haneesh reddy 13Haneesh reddy 13
That Works good.