Python Forum
Problem with datetime [SOLVED]
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with datetime [SOLVED]
#3
I think this stems from the module "datetime" having the same name as the class "datetime", which is confusing.

Try changing your line 34 to this:
date1 = calc_easter(datetime.datetime.now().year)
Reply


Messages In This Thread
Problem with datetime [SOLVED] - by AlphaInc - Apr-22-2022, 09:17 AM
RE: Problem with datetime - by VadimCr - Apr-22-2022, 12:24 PM
RE: Problem with datetime - by GOTO10 - Apr-22-2022, 12:47 PM
RE: Problem with datetime - by snippsat - Apr-22-2022, 01:33 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question [SOLVED] [datetime.strptime] ValueError: time data 'foo' does not match format 'bar' Winfried 1 1,483 Jan-02-2025, 02:09 AM
Last Post: lyly19
  a chess endgame problem, almost solved but not quite max22 0 770 Mar-31-2024, 06:14 PM
Last Post: max22
  A new endgame problem, almost solved but not quite 2 max22 0 898 Mar-07-2024, 07:12 PM
Last Post: max22
  2-dataframe, datetime lookup problem Mark17 0 1,839 Jan-27-2022, 01:02 AM
Last Post: Mark17
  TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'str' findbikash 2 11,749 Sep-18-2019, 08:32 AM
Last Post: buran
  Problem with datetime module PierreSoulier 3 10,438 Jul-24-2018, 11:03 AM
Last Post: perfringo

Forum Jump:

User Panel Messages

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