Assuming from1 is required, the following result was found.
as an example, the equation that's happening is: $thisDateSQL=date("Y-m-d", strtotime($sub_row['DateSession'])); $this_time_from1 = date("H:i", strtotime($sub_row['TimeFromSession'])); $this_time_to1 = date("H:i", strtotime($sub_row['TimeToSession']));...