You need to sign in to do that
Don't have an account?
Angela Schloeder
Date and Time format in Trigger
Hello Experts,
I am trying to figure out how to get the DATE/TIME format to look like this: MM-DD-YYY HH:MM AM/PM. Currently it is all wrong, looking like this: 2016-10-11 19:20:33
Here is my code currently.
if(updateTask.Description != null){
updateTask.Description += '\n' + newTask.CreatedDate + ' ' + newTask.Description;
}
else{
updateTask.Description = newTask.CreatedDate + ' ' + newTask.Description;
I am trying to figure out how to get the DATE/TIME format to look like this: MM-DD-YYY HH:MM AM/PM. Currently it is all wrong, looking like this: 2016-10-11 19:20:33
Here is my code currently.
if(updateTask.Description != null){
updateTask.Description += '\n' + newTask.CreatedDate + ' ' + newTask.Description;
}
else{
updateTask.Description = newTask.CreatedDate + ' ' + newTask.Description;
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_datetime.htm