How can we format today's date in the following date/time format?
it represents yyyy-mm-ddThh:mm:sss-UTC
any suggestions will be appreciated.
Thanks in advance.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
This will be for the current users local time zone. Note:
"If the time zone cannot be determined, GMT is used."
If you want more control over the timezone you can use the DateTime.format(String, String) method and specify the TimeZone.