• George Yang 17
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Hi,
I create a formula field with the following code:

DATETIMEVALUE(Text( CDC_Event_EDate__c) +" "+
IF( RIGHT (Text( CDC_Event_ETime__c ),2)=="PM",
IF(LEFT (Text( CDC_Event_ETime__c ),2)=="12",
TEXT(VALUE(LEFT(Text( CDC_Event_ETime__c), 2))+ 4),
TEXT(VALUE(LEFT(Text( CDC_Event_ETime__c), 2))+ 16)),
TEXT(VALUE(LEFT(Text( CDC_Event_ETime__c ), 2))+ 4)
)+
":" + MID(text(CDC_Event_ETime__c), 4,2)+ ":00")

The CDC_Event_EDate__c is a Date type and the value  is from Salesforce standard date picker.
The CDC_Event_ETime__c field is a string format as
....
08:00 AM
08:30 AM
...
08:00 PM
08:30 PM
09:00 PM
....
Everything is working fine EXCEPT of the time is after 08:00 PM the formula gives error. I could not figure out what is going wrong, Can you help me?  I know there are simple formula to replace the above one but I have tried some but get the same result.
thanks,

George
I like to know if the current Lightning version (W2018) support visalforce page to display public calendar? the old lightning did not work (W2016 at least).

thanks,