+ Start a Discussion

Converting time card hours into military time for calculating total hours worked

I am trying to add a timecard function so our managers can enter time weekly for their employees. I cannot get the "IF" and "ISPICKVAL" to work. I have the following fields created:

"Monday_Time_In" containing picklist values (11:00 AM, 11:15 AM, 12:00 PM, ...)

"Monday_Time_Out" containing picklist values (11:00 AM, 11:15 AM, 12:00 PM, ...)

"Monday_Calc_Start" which I'm trying to use to convert "11:00 AM" to 1100 or "1:00 PM" to 1300

Purpose of converting: converting hours and minutes to military time so I can then calculate actual hours worked by an employee for a particular day


I haven't had success using the Date/Time function because there is no pop-up list or pick list for Time (except in the Events time entry section which doesn't help) and the automatic time pops up when you select a date on a calendar. It's a hassle to highlight and change the auto time that comes with the date selected on the calendar.


Here's the beginning test portion of my current formula (that's not working):


IF( ISPICKVAL(Monday_Time_In__c = "11:00 AM", 1100,

 IF(ISPICKVAL(Monday_Time_In__c = "11:15 AM", 1115,

  IF(ISPICKVAL(Monday_Time_In__c = "11:30 AM", 1130,








Does someone have an easier way to do this or see a mistake in the formula?