Convert String to Time still having problems
This is the error message I get with the following script, please help? It worked fine for the first few reservations, this is the application Copy of Reservations

form Reservations
{
field alignment = left
column
{
First_Name
(
displayname = "First Name"
type = text
width = 200px
)
Last_Name
(
displayname = "Last Name"
type = text
width = 200px
)
Phone_Number
(
displayname = "Phone Number"
type = text
width = 200px
)
Email
(
type = email
width = 200px
)
Select_Date_Start
(
displayname = "Select Date Start"
type = date
width = 130px
on user input
{
input.String_Start_Date_Time = input.Select_Date_Start + " " + input.Time_Start;
input.Select_Date_End = input.Select_Date_Start;
input.Zoho_Date_and_Time_Start = input.Select_Date_Start.toTime();
selectedtime = input.Time_Start.toTime("h:mm a");
input.Zoho_Date_and_Time_Start = input.Zoho_Date_and_Time_Start.addMinutes((selectedtime.getHour() * 60 + selectedtime.getMinutes()));
input.First_Name_and_Time = input.First_Name + " " + input.Time_Start;
}
)
Time_Start
(
displayname = "Time Start"
type = picklist
values = {"7:00 AM", "7:30 AM", "8:00 AM", "8:30 AM", "9:00 AM", "9:30 AM", "10:00 AM", "10:30 AM", "11:00 AM", "11:30 AM", "12:00 PM", "12:30 PM", "1:00 PM", "1:30 PM", "2:00 PM", "2:30 PM", "3:00 PM", "3:30 PM", "4:00 PM", "4:30 PM", "5:00 PM", "5:30 PM", "6:00 PM", "6:30 PM", "7:00 PM", "7:30 PM", "8:00 PM", "8:30 PM"}
width = 206px
on update
{
input.String_Start_Date_Time = input.Select_Date_Start + " " + input.Time_Start;
input.Select_Date_End = input.Select_Date_Start;
input.Zoho_Date_and_Time_Start = input.Select_Date_Start.toTime();
selectedtime = input.Time_Start.toTime("h:mm a");
input.Zoho_Date_and_Time_Start = input.Zoho_Date_and_Time_Start.addMinutes((selectedtime.getHour() * 60 + selectedtime.getMinutes()));
input.First_Name_and_Time = input.First_Name + " " + input.Time_Start;
}
on user input
{
input.String_Start_Date_Time = input.Select_Date_Start + " " + input.Time_Start;
input.Select_Date_End = input.Select_Date_Start;
input.Zoho_Date_and_Time_Start = input.Select_Date_Start.toTime();
selectedtime = input.Time_Start.toTime("h:mm a");
input.Zoho_Date_and_Time_Start = input.Zoho_Date_and_Time_Start.addMinutes((selectedtime.getHour() * 60 + selectedtime.getMinutes()));
input.First_Name_and_Time = input.First_Name + " " + input.Time_Start;
}
)
String_Start_Date_Time
(
displayname = "String Start Date Time"
type = text
private = true
width = 200px
)
Zoho_Date_and_Time_Start
(
displayname = "Zoho Date and Time Start"
type = datetime
private = true
width = 130px
)
Select_Date_End
(
displayname = "Select Date End"
type = date
private = true
width = 130px
)
Time_End
(
displayname = "Time End"
type = picklist
values = {"7:00 AM", "7:30 AM", "8:00 AM", "8:30 AM", "9:00 AM", "9:30 AM", "10:00 AM", "10:30 AM", "11:00 AM", "11:30 AM", "12:00 PM", "12:30 PM", "1:00 PM", "1:30 PM", "2:00 PM", "2:30 PM", "3:00 PM", "3:30 PM", "4:00 PM", "4:30 PM", "5:00 PM", "5:30 PM", "6:00 PM", "6:30 PM", "7:00 PM", "7:30 PM", "8:00 PM", "8:30 PM"}
width = 206px
on update
{
input.String_End_Date_Time = input.Select_Date_End + " " + input.Time_End;
input.Zoho_Date_and_Time_End = input.Select_Date_End.toTime();
selectedtime = input.Time_End.toTime("h:mm a");
input.Zoho_Date_and_Time_End = input.Zoho_Date_and_Time_End.addMinutes((selectedtime.getHour() * 60 + selectedtime.getMinutes()));
}
on user input
{
input.String_End_Date_Time = input.Select_Date_End + " " + input.Time_End;
input.Zoho_Date_and_Time_End = input.Select_Date_End.toTime();
selectedtime = input.Time_End.toTime("h:mm a");
input.Zoho_Date_and_Time_End = input.Zoho_Date_and_Time_End.addMinutes((selectedtime.getHour() * 60 + selectedtime.getMinutes()));
}
)
String_End_Date_Time
(
displayname = "String End Date Time"
type = text
private = true
width = 200px
)
Zoho_Date_and_Time_End
(
displayname = "Zoho Date and Time End"
type = datetime
private = true
width = 130px
)
Type_of_Ride
(
displayname = "Type of Ride"
type = picklist
values = {"1/2 Hour tour of Facility", "Public 1 Hour Ride", "Public 1.5 Hour Ride", "Public 2 Hour Ride", "Public 3 Hour Ride", "Private 1 Hour Ride", "Private 1.5 Hour Ride", "Private 2 Hour Ride", "Private 3 Hour Ride", "Private Lesson", "Public Lesson", "Kids Lesson", "Bulk Lesson (Public lessons)", "Groupon Family Ride", "Groupon Romantic", "Gift Certificate 1 hour", "Gift Certificate 1.5 hour", "Gift Certificate 2 hour", "Boarding", "Pony Party"}
width = 206px
)
Number_of_Riders
(
displayname = "Number of Riders"
type = number
width = 100px
)
Cost_to_Customer
(
displayname = "Cost to Customer"
type = USD
width = 100px
)
Guides
(
type = text
width = 200px
)
Volunteers
(
type = text
width = 200px
)
Ride_Status
(
displayname = "Ride Status"
type = picklist
values = {"Closed", "Canceled", "Rescheduled", "No Show", "Booked"}
width = 206px
)
}
column
{
Riders_Names_Wieghts_Ages
(
displayname = "Riders Names Wieghts Ages"
type = textarea
height = 100px
width = 200px
)
Street_Address
(
displayname = "Street Address"
type = text
width = 200px
)
City
(
type = text
width = 200px
)
State
(
type = text
width = 200px
)
Zip
(
type = number
width = 100px
)
Discount_Cost
(
displayname = "Discount Cost"
type = USD
width = 100px
)
Discount_Reason
(
displayname = "Discount Reason"
type = textarea
height = 100px
width = 200px
)
Notes
(
type = textarea
height = 100px
width = 200px
)
First_Name_and_Time
(
displayname = "First Name and Time"
type = text
private = true
width = 200px
)
}
actions
{
on add
{
on load
{
hide Select_Date_End;
//hide Zoho_Date_and_Time_Start;
hide String_Start_Date_Time;
hide Zoho_Date_and_Time_End;
hide String_End_Date_Time;
hide First_Name_and_Time;
}
Submit
(
type = submit
displayname = "Submit"
PreSubmit = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><preoncommit><sendmail><language><![CDATA[English]]></language><bcc><![CDATA[\"teddi4god@msn.com\"]]></bcc><enabled><![CDATA[true]]></enabled><subject><![CDATA[HorseBack Ride Reservation]]></subject><conttype><![CDATA[HTML]]></conttype><from><![CDATA[zoho.adminuserid]]></from><to><![CDATA[input.Email]]></to><message><![CDATA[Thank you for reserving a ride with Rescue Ranch Saddle Club. Please arrive a 1/2 hour early to give time to prepare for ride and that it can go out on time. Your ride starts at <%=Select_Date_Start%>" "<%=Time_Start%> and ends at <%=Select_Date_Start%> " "<%=Time_End%>. Your type of ride is a <%=Type_of_Ride%>. If you have any questions please call reservations at 503 871 0549. Wear pants and closed shoes, boots are encouraged. No sandals or flip flops, no shorts will be allowed for wear during horseback rides. 95% of proceeds benefit the horse rescue and youth programs. Thanks!<br /><br />Please note that we prefer cash, but checks are accepted.<br /><br />Address is 44425 Thomas Creek Dr. Scio Oregon, 97347 Look for the tan barn on the left hand side of the road<br /><br />]]></message></sendmail></preoncommit>\n"
)
Reset
(
type = reset
displayname = "Reset"
)
}
on edit
{
Update
(
type = submit
displayname = "Update"
)
Cancel
(
type = cancel
displayname = "Cancel"
)
}
}
}