Python Forum
Problem with inserting a string in to Sqlite db
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with inserting a string in to Sqlite db
#3
(Mar-03-2019, 09:03 AM)stranac Wrote: The sqlite3 module does not support the timedelta datatype.
You can get around this by registering an adapter function which will convert it to a type sqlite3 knows about:
https://docs.python.org/3/library/sqlite...-databases

OK i fixed the problem but i dont know if this is the correct way to fix the problem but my solution is
tdelta = str(datetime.strptime(time, FMT) - datetime.strptime(version, FMT))
Reply


Messages In This Thread
RE: Problem with inserting a string in to Sqlite db - by darktitan - Mar-03-2019, 04:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Inserting line feeds and comments into a beautifulsoup string arbiel 1 1,214 Jul-20-2022, 09:05 AM
Last Post: arbiel
  Convert string to float problem vasik006 8 3,456 Jun-03-2022, 06:41 PM
Last Post: deanhystad
  f string concatenation problem growSeb 3 2,295 Jun-28-2021, 05:00 AM
Last Post: buran
Question Problem with string and \n Falassion 6 2,733 Jun-15-2021, 03:59 PM
Last Post: Falassion
  how to deal with problem of converting string to int usthbstar 1 2,002 Jan-05-2021, 01:33 PM
Last Post: perfringo
  string problem Mathisdlg 6 2,901 Aug-05-2020, 09:31 AM
Last Post: Mathisdlg
  Inserting values from multiple lists sqlite azulu 1 2,520 May-24-2020, 08:40 AM
Last Post: ibreeden
  Problem with sqlite bindings scratchmyhead 4 2,690 May-18-2020, 03:55 AM
Last Post: scratchmyhead
  Unicode string index problem luoheng 6 3,082 Nov-23-2019, 03:04 PM
Last Post: luoheng
  simple string & input problem kungshamji 5 3,712 Jun-23-2019, 03:54 PM
Last Post: kungshamji

Forum Jump:

User Panel Messages

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