+ Start a Discussion

Substring in visual force

Hello All,

I want to get substring of a date string in visualforce page inside fullcalendar. Can someone please help how to get it? I am trying to use


where uniteActiviteATP is string type data from controller and having a date in side it.

thanks in advance.
Arunkumar RArunkumar R
Hi Virk,

Substring is supported in controller alone.

public string dateSplit{get;set;}

dateSplit = uniteActiviteATP.substring(6,10);

then Bind dateSplit varible in your visualforce page. You can directly get substring value in visualforce page.

Another way something like below,

<apex:page >
<apex:outputText value="{!LEFT(uniteActiviteATP,4)}"></apex:outputText>
<apex:outputText value="{!RIGHT(uniteActiviteATP,7)}"></apex:outputText>