
3 answers
Hello There,
Note: Please mark it as solved if that helps.Try this:
String timeZone = UserInfo.getTimeZone().getID();
Datetime dateGMT=System.now();// here you can user your dates e.g. createddate
Datetime d1=Datetime.valueOf(dateGMT);
string s1=d1.format();
System.debug('@@@@@@@@@@@'+s1);