• Prashant Bhatt
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
This is my visualforce code. Please help!

<apex:pageBlockSection title="RMS SYSTEM" columns="1" collapsible="false" id="thePbs2"  >
            <apex:outputLabel value="{!$ObjectType.Datavis_Client__c.Fields.RMS_SYSTEM__c.InlineHelpText}" />
           <apex:selectcheckboxes layout="pageDirection"  value="{!MPItems}" label="" id="checkbox1">  
               
               <apex:selectoptions value="{!MPOptions}" > 
                  
               <apex:actionSupport event="onselect" reRender="ajaxrequest" />
                </apex:selectoptions>       
            </apex:selectcheckboxes>
                
              <apex:outputPanel id="ajaxrequest">
                   <apex:outputPanel rendered=" {!MPOptions=='OTHER'}" >
                    <apex:inputField value="{!Datavis_Client__c.Others_data__c}" />
                     </apex:outputPanel>

                   </apex:outputPanel>
           
         </apex:pageBlockSection>
Hello All,
             I have an input field in my visualforce page which uses the html 5 input element as type="datetime-local". The value that I capture from the field is of the format "2016-04-09T23:58" . I want to use and save this field on to the database in salesforce and I cant assign the same value to the field directly. Even to parse salesforce expects a different format something like this '09/04/2016 5:10 PM'.

If I can do something like Datetime dt = DateTime.parse('24/11/2011 1:46 PM') then I can assign it to a field in Salesforce but there is nothing where I can use 2016-04-09T23:58 directly. I will have to convert 2016-04-09T23:58 to 09/04/2016 5:10 PM and do it.

Is there any better way to achieve this  or am I missing something here 

Regards,
Sandy
This is my visualforce code. Please help!

<apex:pageBlockSection title="RMS SYSTEM" columns="1" collapsible="false" id="thePbs2"  >
            <apex:outputLabel value="{!$ObjectType.Datavis_Client__c.Fields.RMS_SYSTEM__c.InlineHelpText}" />
           <apex:selectcheckboxes layout="pageDirection"  value="{!MPItems}" label="" id="checkbox1">  
               
               <apex:selectoptions value="{!MPOptions}" > 
                  
               <apex:actionSupport event="onselect" reRender="ajaxrequest" />
                </apex:selectoptions>       
            </apex:selectcheckboxes>
                
              <apex:outputPanel id="ajaxrequest">
                   <apex:outputPanel rendered=" {!MPOptions=='OTHER'}" >
                    <apex:inputField value="{!Datavis_Client__c.Others_data__c}" />
                     </apex:outputPanel>

                   </apex:outputPanel>
           
         </apex:pageBlockSection>