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

Datetime format with GMT

Iam having hard time in creating the date format in Apex code,
Variable to store : Datetime dte
Need to store time in this format :'1999-05-31T13:20:00-05:00' ;

Rajiv Bhatt 16Rajiv Bhatt 16
What have you already tried? Did you use the the DateTime.format() method to format the date that you have? Please give it an attempt and share the code if you still face any issues. Here is a helpful reference