Hi Jacob,
I'd do the following, however FrnhtGLI may know of a better way.
The following assumes your time field is in the following format "7pm" or "10am" etc - if the string contains minutes/spaces/any other characters the following formula won't work and will need to be revised.
numbervar hourampm;
stringvar ampm;
numbervar hour24;
hourampm:= tonumber(left({table.time_field},length({table.time_field})-2));
ampm:= right({table.time_field},2);
hour24:= if hourampm = 12 then 0 else hourampm;
if ampm = "pm"
then
time(hour24+12,0,0)
else
time(hour24,0,0)
Replace all the {table.time_field} with your field.
Regards,
Ryan.
Edited by rkrowland - 11 Jan 2012 at 12:45am