Python Forum
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'str'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'str'
#3
check your data - you have str values where you expect to have numbers
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'str' - by buran - Sep-18-2019, 08:32 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  datetime module question jacksfrustration 10 1,606 Jan-12-2024, 04:54 AM
Last Post: deanhystad
  subtract 2 datetime string jss 4 706 Oct-19-2023, 02:42 PM
Last Post: Larz60+
  discrepancy with datetime with timezone XJia 3 712 Sep-03-2023, 02:58 PM
Last Post: deanhystad
  Type Error: Unsupported Operand jhancock 2 1,067 Jul-22-2023, 11:33 PM
Last Post: jhancock
  Review my code: convert a HTTP date header to a datetime object stevendaprano 1 1,903 Dec-17-2022, 12:24 AM
Last Post: snippsat
  TypeError: unsupported operand type(s) for +: 'dict' and 'int' nick12341234 1 9,207 Jul-15-2022, 04:04 AM
Last Post: ndc85430
  Trying to delete rows above a specific datetime value cubangt 19 11,004 May-09-2022, 08:57 PM
Last Post: deanhystad
  TypeError: unsupported opperand type(s) for %: 'int' and 'list' cool_person 7 2,096 May-07-2022, 08:40 AM
Last Post: ibreeden
  unsupported operand type(s) for %: 'list' and 'int' RandomCoder 4 32,705 May-07-2022, 08:07 AM
Last Post: menator01
  Problem with datetime [SOLVED] AlphaInc 3 2,543 Apr-22-2022, 01:33 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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