function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
nagalakshminagalakshmi 

How to convert string in to date

Hi,

 

How to convert this string in to date. Please help me its very urgent.

 

Tue Nov 06 00:00:00 GMT 2012

 

Thanks,

Lakshmi

TanayTanay

<apex:column headervalue="Date">
    <apex:outputText value="{0,date,dd'/'MM'/'yyyy}">
        <apex:param value="{!weekStartDate}" />        
    </apex:outputText>

souvik9086souvik9086

Hi,

Try this

String someDate = 'Tue'+' '+'Nov'+' '+'06'+' '+'00:00:00'+' '+'GMT'+' '+'2012'
Date myDate = date.valueOf(somedate);

If this solve your answer , kindly accept it as solution.

 

Thanks