I have created a custom detail button on Task
. On click of the button I am calling URL like
/apex/TaskVF?subject={!Task.Subject}&LastModifiedDate={!Task.LastModifiedDate}.
I am getting the following error and following error displayed on the page:
Invalid date/time: 7/8/2016 10:32 PM
Url:
/apex/TaskVF?subject=Call&last=7%2F8%2F2016+10%3A32+PM
I need this Subject
and LastModifiedDate
in my controller to use.
Here is the code I am using to parse the Datetime
public class TaskController {
public Datetime dt {get;set;}
public TaskController() {
dt =Datetime.valueof(ApexPages.currentPage().getParameters().get('last'));
}
}
TaskController
? This would eliminate the date/time formatting issue you are getting.