Python Forum
[PyQt] to display cotent of database between two dates
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] to display cotent of database between two dates
#17
I modify the code like you say but does'nt work.

and for information the variables 'start_date' and 'end_date' are recovered respectively from functions

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("{:%Y-%m-%d}".format(start_date))
        print("OK")
	
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("{:%Y-%m-%d}".format(end_date))
        print("OK")
Reply


Messages In This Thread
RE: to display cotent of database between two dates - by atlass218 - Jan-03-2020, 09:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Display and update the label text which display the serial value jenkins43 5 9,100 Feb-04-2019, 04:36 AM
Last Post: Larz60+
  Display more than one button in GUI to display MPU6000 Sensor readings barry76 4 3,903 Jan-05-2019, 01:48 PM
Last Post: wuf

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020