Dec-26-2019, 06:50 PM
for information; the column "date_correction" of the table "correction_loc35R" is programmed like TEXT
to recover the start date entered by the user; we created the following function :
to recover the start date entered by the user; we created the following function :
def join_start_date(self): try: start_day = int(self.lineEdit_start_day.text()) start_month = int(self.lineEdit_start_month.text()) start_year = int(self.lineEdit_start_year.text()) start_date = dt.date(start_year, start_month, start_day) except ValueError: print("error") else: self.lineEdit_start_date_writted.setText("{:%d-%m-%Y}".format(start_date)) print("OK")to recover the end date entered by the user; we created the following function :
def join_end_date(self): try: end_day = int(self.lineEdit_end_day.text()) end_month = int(self.lineEdit_end_month.text()) end_year = int(self.lineEdit_end_year.text()) end_date = dt.date(end_year, end_month, end_day) except ValueError: print("error") else: self.lineEdit_end_date_writted.setText("{:%d-%m-%Y}".format(end_date)) print("OK")and here is a descriptive picture of the input blocks of the start date and the end date