+ Start a Discussion
krish@123krish@123 

Please help me......how to split the startdatetime and Enddatetime in visualforce page

HI,
Please find the below screen short

User-added image

Please help me that how to split the startdatetime  and Enddatetime in visualforce page .Actaully we have requirement that we need to create Visualforce page with Event object . I have created  4  Custom fields  in task object.
1.StartDate Field
2.StartCustom picklist (time values tobe taken aa custom picklist )
3.EndDate Field
4.EndCustom picklist (time values tobe taken aa custom picklist )


I need to update the standard startdatetime field in event object  from task object custom fields

Please see the below code 

  public String InDateTime {get;set;}
  public String endDateTime {get;set;}
   private final Task task;
   public Event eventOb;

InDateTime  =(task.StartDate__c + task.StartDateTime__c);
 endDateTime  =(task.EndDate__c+ task.EndDateTime__c);
 eventObj.StartDateTime =Datetime.ValueOf(InDateTime);
  eventObj.EndDateTime = Datetime.ValueOf(endDateTime) 


Please send the any  example if you found  any
Thanks


 
SonamSonam (Salesforce Developers) 
Following thread has sample code on how to achieve this using jquery,you might want to give a read:https://developer.salesforce.com/forums/ForumsMain?id=906F000000096VjIAI