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
BrendBrend 

Date/Time Field


Getting the hour from Date/Time field
My present Date/time field is giving me an hour earlier. Example instead of 6.00pm it will show 7.00pm this is in CST. I guess this is due to the time change. Please I need an update on this formula.

Text(CASE(VALUE(MID(TEXT( evt__Event__r.evt__End__c ) , 12, 2)) , 0, 7, 1, 8, 2, 9,3, 10,4, 11,5, 12,6, 1,7, 2,8, 3,9, 4,10, 5,11, 6,12, 7,13, 8,14,9,15, 10,16, 11,17, 12,18, 1,19, 2,20, 3,21, 4,22, 5,23, 6, 24))  

& ":" & MID(TEXT( evt__Event__r.evt__End__c ) , 15, 2)   

& IF(AND(VALUE(MID(TEXT( evt__Event__r.evt__End__c ) , 12, 2)) >= 5, VALUE(MID(TEXT( evt__Event__r.evt__End__c ) , 12, 2)) <= 16), " AM", " PM")