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
Sagar PawarSagar Pawar 

How i call System.now() method of salesforce from java class

Hi,

 

 

My requirement is i want to get current date and time of salesforce server from java class.

 

 

regards,

Sagar Pawar

Satish_SFDCSatish_SFDC
You cannot use a java class in Apex.
However, you may call the Date.today() method to get the current date in your timezone.

Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.
amarcuteamarcute

There is an API calle getServerTimeStamp().

Check the following URL:

 

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_getservertimestamp.htm