How can it get an end_time that depends on the start_time

Hi,

I have this start_time field type=TIME options from: 8:00 AM to: 6:00 PM format 12 hour

I’m trying to come up with a formula that give me the end_time not lesser than the start time and not nor greater than the start_time range.

below is what initial put in, but it gives me a date format instead of 12 hour and I guess is because it surpasses the start_time range?

startTime + hours(random(0.5,8))

I have the same question. I’ve tried the following:
time(field(“Check-in Time”)) + hours(random(.1,6))
…but I get the following error when I preview: “error: no implicit conversion of ActiveSupport::Duration into String”

I also tried: field(“Check-in Time”) + minutes(random(5,300))
…which doesn’t error, but gives me today’s date as a result.

So I tried wrapping that whole second thing in a time() wrapper like this: time(field(“Check-in Time”) + minutes(random(1,5)))

This gives me correct results, but the resulting column is in military time rather than showing am/pm like the Check-in time column does.