I am an A-level student writing his coursework for computing. A small part of my codes takes in inputs are turns them into a time. 8 o'clock in the morning is shown like this: 08 , Because that's how SQLite likes it. However when converting it into a date I get the error message in the title:
_tkinter.TclError: expected floating-point number but got "08" (looks like invalid octal number)
This also happens with 09 , but not with 06 or 07.
Code:
variable_start = IntVar(root)
variable_start.set("Select Start Time")
option_add_start = ttk.Combobox(window1, textvariable = variable_start,width = 20, state = 'readonly')
option_add_start['values'] = ("06", "07", "08", "09", "10", "11", "12", "13", "14", "15",
"16", "17", "18","19", "20")
hour1 = variable_start.get()
min1 = variable_start_min.get()
starttimehour = str(datetime.time(hour1,min1,second))
Is it something to do with my datatype? I'm not to sure how to fix it.