1

I want the following to happen in salesforce.

system.currentTimeMillis() to MM-dd-yyyy HH:mm:ss.SSS in salesforce.

Anyone could please explain me.

3

Try:

DateTime dt = DateTime.newInstance(system.currentTimeMillis());
system.debug(dt.format('yyyy-MM-dd\'T\'hh:mm:ss\'z\'));

Ofcourse, you can change the options under datetime format method to the way you like.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.