• Santhosh Aloor
  • NEWBIE
  • 25 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hi ,

 

Iam trying to convert String (Mon Oct 14 00:00:00 GMT 2013) to Date

 

String sDate=  'Mon Oct 14 00:00:00 GMT 2013';

Date startDate = date.parse(sDate);
 system.debug('**********eDate*********'+startDate);

 

iam getting the below error:

 

07:56:48.075 (75842000)|SYSTEM_METHOD_ENTRY|[76]|Date.parse(String)
07:56:48.076 (76008000)|EXCEPTION_THROWN|[76]|System.TypeException: Invalid date: Mon Oct 14 00:00:00 GMT 2013
07:56:48.076 (76189000)|SYSTEM_METHOD_EXIT|[76]|Date.parse(String)
07:56:48.076 (76269000)|FATAL_ERROR|System.TypeException: Invalid date: Mon Oct 14 00:00:00 GMT 2013

Class.workingSFDCHrsController.loadOpps: line 76, column 1
07:56:48.076 (76279000)|CODE_UNIT_FINISHED|VFRemote: workingSFDCHrsController invoke(loadOpps)
07:56:48.076 (76285000)|EXECUTION_FINISHED

 

 

Please help me.

 

Thanks advance,

Santhosh.A