My suggestion is, don't save schedules in the database. Save the data in the two datetime columns startTime and endTime.
I have that already and is not what I need. Because if I just have stored start,end time and interval value I only can make equal time differences. What is I have 2 hours break in between time intervals?
Because if I just have stored start,end time and interval value I only can make equal time differences. What is I have 2 hours break in between time intervals?
I don't understand what you mean. In any case, here is a dynamic example:
<cfset t1_meridiem = getMeridiem(t1)>
<cfset t2_meridiem = getMeridiem(t2)>
<!--- time in 12-hour format; note the lower-case letters --->
<cfoutput>#timeFormat(t1,"hh:mm")# #t1_meridiem#-#timeFormat(t2,"hh:mm")# #t2_meridiem#</cfoutput>
<cfargument name="t" default="#now()#" required="true" type="date">
<!--- time in 24-hour format; note the capital letters --->
<cfset var time24 = timeFormat(t,"HH:MM")>
<cfset var hour24 = listFirst(time24, ":")>
<cfif hour24 LTE 11>