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
#16
Okay you are missing the issue. You are wrapping your variables (and now functions as well) inside your Quotes which turns that entire thing into a single string and that is not what you are wanting to do as string is a string not a variable nor a function. Now if you insist on doing this all in one line (a bad thing to do btw) then change the following:

c=curseur.execute("SELECT * FROM correction_loc35R WHERE date_correction BETWEEN start_date.strftime('%Y-%m-%d') AND end_date.strftime('%Y-%m-%d') ")

To This

c=curseur.execute("SELECT * FROM correction_loc35R WHERE date_correction BETWEEN "+start_date.strftime('%Y-%m-%d')+" AND "+end_date.strftime('%Y-%m-%d'))
Reply


Messages In This Thread
RE: to display cotent of database between two dates - by Denni - Jan-03-2020, 08:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Display and update the label text which display the serial value jenkins43 5 9,036 Feb-04-2019, 04:36 AM
Last Post: Larz60+
  Display more than one button in GUI to display MPU6000 Sensor readings barry76 4 3,874 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