If Event.StartTimeAMPM='PM' AND Event.StartTimeTime IN '01:00', '01:30', '02:00', '02:30', '03:00', '03:30', '04:00', '04:30', '05:00', '05:30', '06:00', '06:30', '07:00', '07:30', '08:00', '08:30', '09:00', '09:30', '10:00', '10:30', '11:00', '11:30' Then
Event.StartTime=Timestamp(DAY_OF_MONTH(Event.StartTimeDate),MONTH(Event.StartTimeDate),YEAR(Event.StartTimeDate),AS_NUMBER(CHARS_FROM_LEFT(Event.StartTimeTime,2))+12,AS_NUMBER(CHARS_FROM_RIGHT(Event.StartTimeTime,2)))
If Event.StartTimeAMPM='AM' AND Event.StartTimeTime IN '12:00', '12:30' Then
Event.StartTime=Timestamp(DAY_OF_MONTH(Event.StartTimeDate),MONTH(Event.StartTimeDate),YEAR(Event.StartTimeDate),AS_NUMBER(CHARS_FROM_LEFT(Event.StartTimeTime,2)),AS_NUMBER(CHARS_FROM_RIGHT(Event.StartTimeTime,2)))
To handle the setting of AM PM here's what I did. I followed technopak's advice and I also created 2 extra fields. StartTimeAMPM, EndTimeAMPM with both only having AM or PM as a choice. I then added the code above to the business objects rules to set the start time. To set the end time just substitute end time for start time in the rule. You also have to create a separate rule for the 12:00 and 12:30 time slot.